On 4/2/2012 9:57 PM, Bill Hoffman wrote:
Well, you could implement it... :)
This is an interesting interface:
target_link_libraries(foo STATIC lib1 lib2 SHARED lib3 lib4)
I would suggest that you move to the discussion to the cmake-developers
list.
I had another thought on this. Usually it is good enough to build all
of your applications libraries static, and CMake does handle this. If
you use the BUILD_SHARED_LIBS variable in your project you can get it to
build all the libraries as either static or shared based on the value of
this variable.
For example:
option(BUILD_SHARED_LIBS "Build Shared Libraries" OFF)
add_library(foo foo.c)
add_executable(bar bar.c)
target_link_libraries(bar foo)
IF BUILD_SHARED_LIBS = OFF then you get static foo, if it is ON, then
you get a shared foo. The system libraries are another issue... :)
-Bill
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake