CMake: using LIBRARY_BUILDMODE for libraries responding to WITH_STATIC_LIBRARIES
authorTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Fri, 4 Jan 2013 12:01:17 +0000 (04:01 -0800)
committerTimo Lotterbach <timo.lotterbach@bmw-carit.de>
Mon, 14 Jan 2013 08:34:17 +0000 (00:34 -0800)
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
LayerManagerCommands/CMakeLists.txt
LayerManagerPlugins/IpcModules/IpcModuleLoader/CMakeLists.txt

index 3925a4a..746a579 100644 (file)
@@ -32,11 +32,7 @@ include_directories(
 file(GLOB LM_SOURCES src/*.cpp)
 file(GLOB LM_INCLUDES include/*.h)
 
-if (WITH_STATIC_LIBRARIES)
-    add_library(${PROJECT_NAME} STATIC ${LM_SOURCES})
-else (WITH_STATIC_LIBRARIES)
-    add_library(${PROJECT_NAME} SHARED ${LM_SOURCES})
-endif (WITH_STATIC_LIBRARIES)
+add_library(${PROJECT_NAME} ${LIBRARY_BUILDMODE} ${LM_SOURCES})
 
 set(LIBS ${LIBS} LayerManagerUtils LayerManagerBase)
 target_link_libraries(${PROJECT_NAME} ${LIBS})
index 0798e18..eb43a75 100644 (file)
@@ -28,11 +28,7 @@ include_directories(
     "${CMAKE_SOURCE_DIR}/LayerManagerPlugins/IpcModules/IpcModuleLoader/include"
 )
 
-if(WITH_STATIC_LIBRARIES)
-    add_library(IpcModuleLoader STATIC src/IpcModuleLoader.c)
-else(WITH_STATIC_LIBRARIES)
-    add_library(IpcModuleLoader SHARED src/IpcModuleLoader.c)
-endif(WITH_STATIC_LIBRARIES)
+add_library(IpcModuleLoader ${LIBRARY_BUILDMODE} src/IpcModuleLoader.c)
 
 set(LIBS
     dl