diff options
author | Robert Tari <robert@tari.in> | 2021-08-30 01:26:19 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-08-30 01:26:19 +0200 |
commit | 22e66866c7b17fc655479ca911269b86cb80a744 (patch) | |
tree | e0aa6e6a8f50fd8451e03efc17b89d8c8c3de781 /CMakeLists.txt | |
parent | 1f8263dedf9b7e6f9e06492bd69f2436e36171a2 (diff) | |
parent | 38e5efecbb3154a83a70c1c762802ec7927b3caa (diff) | |
download | ayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.tar.gz ayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.tar.bz2 ayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.zip |
Merge branch 'tari01-pr/ubports-patches'
Attributes GH PR #46: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/46
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 56 |
1 files changed, 26 insertions, 30 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 33781a0..8e682ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,16 +66,15 @@ pkg_check_modules (SERVICE_DEPS REQUIRED gstreamer-1.0>=1.2 libnotify>=0.7.6 properties-cpp>=0.0.1 - libaccounts-glib>=1.18) + libaccounts-glib>=1.18 + messaging-menu>=0.8.2) include_directories (SYSTEM ${SERVICE_DEPS_INCLUDE_DIRS}) -set(URL_DISPATCHER_REQUIRED_VERSION 0) -pkg_check_modules(URLDISPATCHER - lomiri-url-dispatcher>=${URL_DISPATCHER_REQUIRED_VERSION} -) +# lomiri-url-dispatcher + +pkg_check_modules(URLDISPATCHER lomiri-url-dispatcher>=0) include_directories(${URLDISPATCHER_INCLUDE_DIRS}) -# url-dispatcher support is optional... if(URLDISPATCHER_FOUND) add_definitions( -DHAS_URLDISPATCHER ) endif() @@ -96,9 +95,6 @@ add_custom_target (dist COMMAND bzr export --root=${ARCHIVE_NAME} ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) -add_custom_target (clean-coverage - COMMAND find ${CMAKE_BINARY_DIR} -name '*.gcda' | xargs rm -f) - add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2 --inline-suppr ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/tests) @@ -123,32 +119,32 @@ endif() include_directories (${CMAKE_CURRENT_SOURCE_DIR}/include) include_directories (${CMAKE_CURRENT_BINARY_DIR}/include) -# testing & coverage -if (${ENABLE_TESTS}) - pkg_check_modules (DBUSTEST REQUIRED dbustest-1>=14.04.0) - - if (EXISTS /usr/src/googletest/src) - set (GTEST_SOURCE_DIR /usr/src/googletest/src) - else () - set (GTEST_SOURCE_DIR /usr/src/gtest/src) - endif () - - set (GTEST_INCLUDE_DIR ${GTEST_SOURCE_DIR}/..) - set (GTEST_LIBS -lpthread) - enable_testing () - if (${ENABLE_COVERAGE}) - include(GCov) - endif () -endif () - # actually build things add_subdirectory(include) add_subdirectory(src) add_subdirectory(data) add_subdirectory(po) -if (${ENABLE_TESTS}) - add_subdirectory(tests) -endif () + +# testing & coverage +if (ENABLE_TESTS) + + include(CTest) + pkg_check_modules (DBUSTEST REQUIRED dbustest-1>=14.04.0) + enable_testing() + add_subdirectory(tests) + + if (ENABLE_COVERAGE) + + find_package(CoverageReport) + ENABLE_COVERAGE_REPORT( + TARGETS indicatordatetimeservice ayatana-indicator-datetime-service + TESTS ${COVERAGE_TEST_TARGETS} + FILTER /usr/include ${CMAKE_BINARY_DIR}/* + ) + + endif() + +endif() # Display config info |