[CMake] Static and DLL builds in single solution
Matt Campbell
mattc at nvidia.com
Sat Dec 8 16:23:28 EST 2012
That’s what I was thinking as well, however, what wasn’t clear to me is how to associate the DLL version with the DLL configuration and the static lib with the static configuration type? Make it will just work, I’ll have to try it I suppose.
From: Klaim - Joël Lamotte [mailto:mjklaim at gmail.com]
Sent: Saturday, December 08, 2012 10:35 AM
To: Matt Campbell
Cc: cmake at cmake.org
Subject: Re: [CMake] Static and DLL builds in single solution
For example:
add_library( mylibStatic STATIC ${MYLIB_ALL_SOURCES} ) # generate the static version of the lib
add_library( mylibDLL SHARED ${MYLIB_ALL_SOURCES} ) # generate the dll loaded at startup version of the same lib, same sources
add_library( mylibExtension MODULE ${MYLIB_ALL_SOURCES} ) # generate the dll loadable when running version of the same lib, same sources
This works well if you keem the names different. Anyway, adding some CMake options to let the user choose what is generated could be good too.
Joel Lamotte
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121208/ab07b89e/attachment.htm>
More information about the CMake
mailing list