summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/Common/Backends/CMakeLists.txt1
-rw-r--r--src/Common/RequestHandlers/CMakeLists.txt5
-rw-r--r--src/Core/CMakeLists.txt2
-rw-r--r--src/Net/CMakeLists.txt2
5 files changed, 8 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ddc9867..acce966 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
+
add_subdirectory(Core)
add_subdirectory(Net)
add_subdirectory(Common)
diff --git a/src/Common/Backends/CMakeLists.txt b/src/Common/Backends/CMakeLists.txt
index 4d9d30e..631af52 100644
--- a/src/Common/Backends/CMakeLists.txt
+++ b/src/Common/Backends/CMakeLists.txt
@@ -3,4 +3,3 @@ include_directories(${INCLUDES})
add_library(Backends STATIC
NetworkUserBackend.cpp NetworkUserBackend.h
)
-target_link_libraries(Backends Common)
diff --git a/src/Common/RequestHandlers/CMakeLists.txt b/src/Common/RequestHandlers/CMakeLists.txt
index e6e34a7..7c5fa8f 100644
--- a/src/Common/RequestHandlers/CMakeLists.txt
+++ b/src/Common/RequestHandlers/CMakeLists.txt
@@ -7,4 +7,7 @@ add_library(RequestHandlers STATIC
SimpleRequestHandlerGroup.cpp SimpleRequestHandlerGroup.h
StatusRequestHandler.cpp StatusRequestHandler.h
)
-target_link_libraries(RequestHandlers Common)
+
+if(NOT BUILD_SHARED_LIBS)
+ target_link_libraries(RequestHandlers Common)
+endif(NOT BUILD_SHARED_LIBS)
diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt
index 9693460..3c0db7a 100644
--- a/src/Core/CMakeLists.txt
+++ b/src/Core/CMakeLists.txt
@@ -1,7 +1,7 @@
include_directories(${INCLUDES})
link_directories(${Boost_LIBRARY_DIRS})
-add_library(Core
+add_library(Core STATIC
Signals/Connection.h
Signals/GenericSignal.h
Signals/Signal0.h
diff --git a/src/Net/CMakeLists.txt b/src/Net/CMakeLists.txt
index 298aebe..ceaf6bd 100644
--- a/src/Net/CMakeLists.txt
+++ b/src/Net/CMakeLists.txt
@@ -1,6 +1,6 @@
include_directories(${INCLUDES})
-add_library(Net
+add_library(Net STATIC
ClientConnection.cpp ClientConnection.h
Connection.cpp Connection.h
Listener.cpp Listener.h