I have a CMakeLists.txt file with multiple targets in it. A single library and multiple apps that depend on the library. When I build the library I need to define a preprocessor but when I build the other targets I Don't want it defined. Does that make sense?

psuedo cmake file:

ADD_DEFINITION("_DLLEXPORT") //but I only want this to be applied to the library?
ADD_LIBRARY(BaseLib ${Base_Sources} )


ADD_DEFINITION("_DLLIMPORT") //and this only for the executable?
ADD_EXECUTABLE(BaseTest ${Base_Test_sources} )
TARGET_LINK_LIBRARIES(BaseTest BaseLib)


How would I do this? Use Target_Properties? Which I know little about..

thanks
--
Mike Jackson
imikejackson & gmail * com



_______________________________________________
CMake mailing list
[EMAIL PROTECTED]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to