Ok, sorry, I used the online nabble interface to cmake mailing list actually
but here is my original message without any formatting, after the marker
-----. I'll take the opportunity to explain the rationales. I found out that
the time spent by CPack running rpmbuild is only a very small portion of the
total runtime and I need to build the same package on different platforms.
So I thought of simply running CPack once and then copying over the
_CPack_Packages/... directory and run rpmbuild directly.

---------------

I would like to end up with the following in the specs file: 

...
%file
...
%if 0%{fedora} >= 14
"/path/to/some/file"
%endif

I tried to use CPACK_RPM_USER_FILELIST as 

set(CPACK_RPM_USER_FILELIST ${CPACK_RPM_USER_FILELIST}
    "%if 0%{fedora} >= 14"
    "/path/to/some/file"
    "%endif"
)

but this results in 

%if "0%{fedora} >= 14"
"/path/to/some/file"
%endif "%endif"
which is not quite right. 

Is there something I am missing? Or is it a fundamental limitation of CPack
RPM generator? If so, would there be any workaround? Thanks in advance for
any help.




-----
--
Luc J. Bourhis

--
View this message in context: 
http://cmake.3232098.n2.nabble.com/CPACK-RPM-Using-if-in-file-section-tp7590576p7590586.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to