From a85bce953b8a231cfe9b47d9f3fd80f6149f51f2 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Sun, 18 Nov 2018 12:13:28 +0100 Subject: [PATCH] Use standard BUILD_TESTING instead of BUILD_TESTS Add tests subdir conditionally. --- CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73bb3cb..13531cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,7 +34,7 @@ include_directories( find_package(Qt5Widgets QUIET) find_package(Qt5DBus QUIET) find_package(Qt5Test QUIET) -set(BUILD_TESTS ${Qt5Test_FOUND}) +set(BUILD_TESTING ${Qt5Test_FOUND}) add_definitions(${Qt5Core_DEFINITIONS} ${Qt5Widgets_DEFINITIONS} ${Qt5DBus_DEFINITIONS}) include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS} ${Qt5DBus_INCLUDE_DIRS}) @@ -70,7 +70,9 @@ if(APPLE) endif(APPLE) add_subdirectory(src) -add_subdirectory(tests) +if(BUILD_TESTING) + add_subdirectory(tests) +endif() add_subdirectory(examples) # we need the absolute directories where stuff will be installed too -- 2.19.1