diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d57a0b..7539886 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -218,8 +218,6 @@ if(SQLITE3_FOUND OR PQ_FOUND) include_directories(database ${PQ_INCLUDE_DIRS}) endif() set(USE_DATABASE TRUE) -else() - add_library(database OBJECT "") endif() # @@ -235,8 +233,7 @@ add_executable(${PROJECT_NAME} src/main.cpp $ $ $ - $ - $) + $) ## test_suite file(GLOB source_tests @@ -249,9 +246,12 @@ add_executable(test_suite ${source_tests} $ $ $ - $ - $) + $) set_target_properties(test_suite PROPERTIES EXCLUDE_FROM_ALL TRUE) +if(USE_DATABASE) + target_link_libraries(${PROJECT_NAME} $) + target_link_libraries(test_suite $) +endif() # ## Link the executables with their libraries