blob: cb4285e915f421ed96a44054b62bbf166e947f9e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
diff --git a/so_5/CMakeLists.txt b/so_5/CMakeLists.txt
index bd6f1d7..0e30831 100644
--- a/so_5/CMakeLists.txt
+++ b/so_5/CMakeLists.txt
@@ -71,12 +71,17 @@ set(SO_5_SRC exception.cpp
disp/prio_dedicated_threads/one_per_prio/pub.cpp
)
-add_library(${SO_5_TARGET} SHARED ${SO_5_SRC})
+if (SO_BUILD_STATIC)
+ message(STATUS "Building static.")
+ add_library(${SO_5_TARGET} STATIC ${SO_5_SRC})
+ target_compile_definitions(${SO_5_TARGET}
+ PUBLIC -DSO_5_STATIC_LIB
+ )
+else()
+ message(STATUS "Building dynamic.")
+ add_library(${SO_5_TARGET} SHARED ${SO_5_SRC})
+endif()
-add_library(${SO_5_S_TARGET} STATIC ${SO_5_SRC})
-target_compile_definitions(${SO_5_S_TARGET}
- PUBLIC -DSO_5_STATIC_LIB
-)
set(SO_5_EXT_LIBS )
if( ANDROID )
@@ -90,7 +95,7 @@ foreach(__extLibrary ${SO_5_EXT_LIBS})
endforeach()
install(
- TARGETS ${SO_5_TARGET} ${SO_5_S_TARGET}
+ TARGETS ${SO_5_TARGET}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
|