From 9079ffa4ff24d8dfe27a2268ab69ccf0483c42d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 13 Mar 2012 17:10:46 +0100 Subject: [PATCH] Add clsocket as a dependency for dfhack lib. --- .gitmodules | 3 +++ CMakeLists.txt | 1 + depends/CMakeLists.txt | 4 ++++ depends/clsocket | 1 + library/CMakeLists.txt | 2 +- 5 files changed, 10 insertions(+), 1 deletion(-) create mode 160000 depends/clsocket diff --git a/.gitmodules b/.gitmodules index 76fb139db..700af743b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "library/xml"] path = library/xml url = git://github.com/peterix/df-structures.git +[submodule "depends/clsocket"] + path = depends/clsocket + url = git://github.com/peterix/clsocket.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 620bf6d9a..367e68f60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,6 +110,7 @@ include_directories(depends/md5) include_directories(depends/tinyxml) include_directories(depends/tthread) include_directories(${ZLIB_INCLUDE_DIRS}) +include_directories(depends/clsocket/src) add_subdirectory(depends) diff --git a/depends/CMakeLists.txt b/depends/CMakeLists.txt index d16e83eaa..d879657e0 100644 --- a/depends/CMakeLists.txt +++ b/depends/CMakeLists.txt @@ -4,3 +4,7 @@ add_subdirectory(md5) add_subdirectory(protobuf) add_subdirectory(tinyxml) add_subdirectory(tthread) +# build clsocket static and only as a dependency. Setting those options here overrides its own default settings. +OPTION(CLSOCKET_SHARED "Build clsocket lib as shared." OFF) +OPTION(CLSOCKET_DEP_ONLY "Build for use inside other CMake projects as dependency." ON) +add_subdirectory(clsocket) diff --git a/depends/clsocket b/depends/clsocket new file mode 160000 index 000000000..49fa80061 --- /dev/null +++ b/depends/clsocket @@ -0,0 +1 @@ +Subproject commit 49fa800615a4e5c872164bcb4122030d2ebda9cf diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index ac54340e8..0521184ce 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -228,7 +228,7 @@ ENDIF() #effectively disables debug builds... SET_TARGET_PROPERTIES(dfhack PROPERTIES DEBUG_POSTFIX "-debug" ) -TARGET_LINK_LIBRARIES(dfhack protobuf-lite ${PROJECT_LIBS}) +TARGET_LINK_LIBRARIES(dfhack protobuf-lite clsocket ${PROJECT_LIBS}) SET_TARGET_PROPERTIES(dfhack PROPERTIES LINK_INTERFACE_LIBRARIES "") IF(UNIX)