From 72c3324cf38f0173676f123ed4d8e3418c66f14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 8 Jun 2018 20:03:55 +0200 Subject: Correctly use target_sources instead of target_link_libraries --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7539886..c6ac616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -249,8 +249,8 @@ 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 $) + target_sources(${PROJECT_NAME} PRIVATE $) + target_sources(test_suite PRIVATE $) endif() # -- cgit v1.2.3