diff options
author | louiz’ <louiz@louiz.org> | 2018-06-08 19:31:57 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-06-08 19:31:57 +0200 |
commit | 1157264940053a07c832ba018bc0d6bd6e5866ff (patch) | |
tree | 5645c7a560cdd01379f8474562a214605faec506 | |
parent | e3730c5a40a9d4a098ae9fb9a3bd867803007da1 (diff) | |
download | biboumi-1157264940053a07c832ba018bc0d6bd6e5866ff.tar.gz biboumi-1157264940053a07c832ba018bc0d6bd6e5866ff.tar.bz2 biboumi-1157264940053a07c832ba018bc0d6bd6e5866ff.tar.xz biboumi-1157264940053a07c832ba018bc0d6bd6e5866ff.zip |
Revert "Don’t add_library(database) with an empty string, that’s not portable"
This reverts commit e3730c5a40a9d4a098ae9fb9a3bd867803007da1.
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7539886..1d57a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,6 +218,8 @@ if(SQLITE3_FOUND OR PQ_FOUND) include_directories(database ${PQ_INCLUDE_DIRS}) endif() set(USE_DATABASE TRUE) +else() + add_library(database OBJECT "") endif() # @@ -233,7 +235,8 @@ add_executable(${PROJECT_NAME} src/main.cpp $<TARGET_OBJECTS:xmpp> $<TARGET_OBJECTS:bridge> $<TARGET_OBJECTS:irc> - $<TARGET_OBJECTS:identd>) + $<TARGET_OBJECTS:identd> + $<TARGET_OBJECTS:database>) ## test_suite file(GLOB source_tests @@ -246,12 +249,9 @@ add_executable(test_suite ${source_tests} $<TARGET_OBJECTS:xmpp> $<TARGET_OBJECTS:bridge> $<TARGET_OBJECTS:irc> - $<TARGET_OBJECTS:identd>) + $<TARGET_OBJECTS:identd> + $<TARGET_OBJECTS:database>) set_target_properties(test_suite PROPERTIES EXCLUDE_FROM_ALL TRUE) -if(USE_DATABASE) - target_link_libraries(${PROJECT_NAME} $<TARGET_OBJECTS:database>) - target_link_libraries(test_suite $<TARGET_OBJECTS:database>) -endif() # ## Link the executables with their libraries |