diff --git a/CMakeLists.txt b/CMakeLists.txt index c3979fc215..41a9b85f3c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,9 +67,9 @@ omim_set_platform_var(PLATFORM_LINUX "linux-.*" ${LINUX_DETECTED}) find_package(Threads) -find_package(Qt5Core REQUIRED) -find_package(Qt5Network REQUIRED) if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID) + find_package(Qt5Core REQUIRED) + find_package(Qt5Network REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5OpenGL REQUIRED) find_package(Qt5Widgets REQUIRED) @@ -91,9 +91,7 @@ get_filename_component(OMIM_ROOT . ABSOLUTE) include_directories( ${CMAKE_HOME_DIRECTORY} - ${Qt5Core_LIBRARIES} ${Qt5Core_INCLUDE_DIRS} - ${Qt5Network_LIBRARIES} ${Qt5Network_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY}/3party/boost ) @@ -109,6 +107,8 @@ endfunction() function(omim_add_test_subdirectory subdir) if (NOT NO_TESTS) add_subdirectory(${subdir}) + else() + message("NO_TESTS: Skipping subdirectory ${subdir}") endif() endfunction() @@ -166,8 +166,6 @@ add_subdirectory(3party/liboauthcpp) add_subdirectory(3party/pugixml) add_subdirectory(3party/succinct) add_subdirectory(3party/osrm) -add_subdirectory(3party/gmock) -add_subdirectory(qt_tstfrm) add_subdirectory(base) add_subdirectory(coding) add_subdirectory(geometry) @@ -183,3 +181,6 @@ add_subdirectory(search) add_subdirectory(tracking) add_subdirectory(traffic) add_subdirectory(partners_api) + +omim_add_test_subdirectory(qt_tstfrm) +omim_add_test_subdirectory(3party/gmock) diff --git a/geometry/CMakeLists.txt b/geometry/CMakeLists.txt index 8eae14a978..eb24d30e87 100644 --- a/geometry/CMakeLists.txt +++ b/geometry/CMakeLists.txt @@ -50,4 +50,4 @@ set( add_library(${PROJECT_NAME} ${SRC}) -add_subdirectory(geometry_tests) +omim_add_test_subdirectory(geometry_tests) diff --git a/tracking/CMakeLists.txt b/tracking/CMakeLists.txt index ae901e2472..8031fbf035 100644 --- a/tracking/CMakeLists.txt +++ b/tracking/CMakeLists.txt @@ -12,5 +12,5 @@ set( add_library(${PROJECT_NAME} ${SRC}) -add_subdirectory(tracking_tests) +omim_add_test_subdirectory(tracking_tests) add_subdirectory(pytracking) diff --git a/traffic/CMakeLists.txt b/traffic/CMakeLists.txt index 67e22055b3..fd8956e390 100644 --- a/traffic/CMakeLists.txt +++ b/traffic/CMakeLists.txt @@ -11,4 +11,4 @@ set( add_library(${PROJECT_NAME} ${SRC}) add_subdirectory(pytraffic) -add_subdirectory(traffic_tests) +omim_add_test_subdirectory(traffic_tests)