[CMake] Copying shared libraries in a post-build step
Sergei Nikulov
sergey.nikulov at gmail.com
Wed Dec 10 05:36:59 EST 2014
2014-12-10 13:29 GMT+03:00 Sergei Nikulov <sergey.nikulov at gmail.com>:
>
>
> 2014-12-10 2:38 GMT+03:00 Walter Gray <chrysalisx at gmail.com>:
>
>> Hey all,
>> I'm working on a module that will allow me to automatically copy all the
>> required .dll files as defined by well-formed import library targets to the
>> appropriate location (same folder for windows, Frameworks folder for OSX
>> bundle, ect). I've got the code that scans an executable's
>> INTERFACE_LINK_LIBRARIES property recursively to find all such shared
>> library, however I'm running into a small problem. I really like using
>> file globbing in higher level source directories to add all appropriate
>> sub-directories, but this means that sometimes a dependency will not be
>> fully defined yet. This is normally fine since these things are usually
>> resolved at *generation* time, but since I'm doing a manual traversal of
>> the list of link libraries at config time that's not really acceptable. I
>> realize I could just not do the globbing and just make sure the directories
>> were setup in the correct order, but I really don't like making the
>> add_subdirectory calls order dependent.
>>
>
Sorry for empty email.
Instead of globbing you can set single place for all project binary output
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/dist)
Or whatever other place instead of top project folder.
--
Best Regards,
Sergei Nikulov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141210/78483c45/attachment.html>
More information about the CMake
mailing list