[CMake] cpack generator variable

Tiago Macarios tiagomacarios at gmail.com
Fri Feb 26 16:40:40 EST 2016


Hi All,

I have a cmake project which one of the install targets is a collection of
files. This files change depending on the configuration (Release,
Debug...). I would like to be able to install the files like so:

install(DIRECTORY $<TARGET_FILE_DIR:tgt>
    DESTINATION bin
    COMPONENT files)

>From the docs I see that cmake does not support that. Generator variables
do not apply to DIRECTORY. So I was wondering if there is a way to either
save the directory information somewhere and pass it to cpack afterwards.

So I guess the question is how to pass a variable from cmake to cpack?

Best,
Tiago
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160226/e6a7ad6f/attachment.html>


More information about the CMake mailing list