[cmake-developers] Generator Expressions in CPack (Module) variables
Nils Gladitz
nilsgladitz at gmail.com
Fri Apr 24 15:30:27 EDT 2015
On 24.04.2015 20:55, Gregor Jasny wrote:
> Hello,
>
> would it be possible to add generator expression support to CPack
> so that I can use $<CONFIG> within CPACK_PACKAGE_FILE_NAME? I'm
> using the CPack module from within my CMakeLists.txt.
>
> I'm trying to generate unique file names per architecture and
> configuration but multi config generators like Xcode make this
> harder than expected.
>
> Before digging into that topic I'd like to know if this would be
> a dead end.
>
You should be able to do this without generator expressions and just
CPACK_PROJECT_CONFIG_FILE [1] and CPACK_BUILD_CONFIG [2].
If you really do require/want generator expressions you should be able
to combine that with file(GENERATE) and include().
Nils
[1]
http://www.cmake.org/cmake/help/v3.2/module/CPack.html#variable:CPACK_PROJECT_CONFIG_FILE
[2] Set by cpack to the configuration being packaged (e.g. Debug,
Release, ...)
[3] http://www.cmake.org/cmake/help/v3.2/command/file.html
More information about the cmake-developers
mailing list