On Tuesday 22 January 2008, Steffen Wendzel wrote: > hi, > > I'm new on cmake and tried it for the 2nd time this day. I want to > build both: a static and a shared object from my code and tried it > this way: > > ADD_LIBRARY(cmle SHARED > src/libcmle.C > src/libcmle_int.C > ) > > ADD_LIBRARY(cmle STATIC > src/libcmle.C > src/libcmle_int.C > ) > > But this didn't work, only the shared object was created. What > went wrong?
You created two targets with the same name, this isn't supported. Do something like this: ADD_LIBRARY(cmle_SHARED SHARED ...) SET_TARGET_PROPERTIES(cmle_SHARED PROPERIES ... OUTPUT_NAME cmle) ADD_LIBRARY(cmle_STATIC STATIC ...) SET_TARGET_PROPERTIES(cmle_STATIC PROPERIES ... OUTPUT_NAME cmle) Are you actually sure you need to build both versions ? Bye Alex _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
