summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-12 11:39:27 +0200
committerlouiz’ <louiz@louiz.org>2016-07-12 11:39:27 +0200
commitf212b47830b4ef6473bbcfaab33297a169643d8b (patch)
treedea0e1d6ba4ea632d46a0c5990c6ebb5193854ac
parentfa42d0c178faa74b6872c4e0121709ef6682175d (diff)
downloadbiboumi-f212b47830b4ef6473bbcfaab33297a169643d8b.tar.gz
biboumi-f212b47830b4ef6473bbcfaab33297a169643d8b.tar.bz2
biboumi-f212b47830b4ef6473bbcfaab33297a169643d8b.tar.xz
biboumi-f212b47830b4ef6473bbcfaab33297a169643d8b.zip
Use an ugly way, because SOURCES property does not work in cmake 3.0
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31df11f..06121a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -123,9 +123,14 @@ endif()
#
## utils
#
-file(GLOB source_utils
+file(GLOB source_src_utils
src/utils/*.[hc]pp)
-set_property(TARGET utils APPEND PROPERTY SOURCES ${source_utils})
+# Todo, switch to target_sources(utils) when we go cmake >=3.1 only
+add_library(src_utils STATIC ${source_src_utils})
+target_link_libraries(src_utils logger config)
+if(USE_DATABASE)
+ target_link_libraries(src_utils database)
+endif()
#
## irclib
@@ -141,7 +146,7 @@ target_link_libraries(irc network utils logger)
file(GLOB source_xmpp
src/xmpp/*.[hc]pp)
add_library(xmpp STATIC ${source_xmpp})
-target_link_libraries(xmpp xmpplib bridge network utils logger)
+target_link_libraries(xmpp xmpplib bridge network utils src_utils logger)
if(USE_DATABASE)
target_link_libraries(xmpp database)
@@ -165,6 +170,7 @@ target_link_libraries(${PROJECT_NAME}
irc
bridge
utils
+ src_utils
config)
if(SYSTEMD_FOUND)
target_link_libraries(xmpp ${SYSTEMD_LIBRARIES})