[CMake] making a custom target like add_library()

Tom Kacvinsky tom.kacvinsky at vectorcast.com
Mon Jan 25 11:24:26 EST 2016


I create a DLL and import library via custom commands, but for my purposes
right now, I need these libraries to be treated as if they were generated
with add_library() (for the project I am workingon where I get transitive
dependencies);

I read this

http://stackoverflow.com/questions/31274577/custom-target-as-a-target-library-in-cmake

but I am not sure if this will invoke the MS linker tools and wreal havoc
with the specialized build of the DLL.  Also, this is for a DLL, not a
static archive, so in the line

add_library(lib2 STATIC IMPORTED GLOBAL)

would I change STATIC to SHARED?

Thanks,

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160125/f42ebd5a/attachment-0001.html>


More information about the CMake mailing list