aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:17:41 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:17:41 +0200
commit046a91ec739efdf1504e8716a28cec2fd5782303 (patch)
tree5e2c48a3dcd5992e4c190609484706a69d3393f8 /tests/CMakeLists.txt
parent92ac2554299affa7980dd754dfa5745ce1571bdd (diff)
parentd5a53027e58b6153b86b6c4b832cfd393bcdefb0 (diff)
downloadayatana-indicator-power-046a91ec739efdf1504e8716a28cec2fd5782303.tar.gz
ayatana-indicator-power-046a91ec739efdf1504e8716a28cec2fd5782303.tar.bz2
ayatana-indicator-power-046a91ec739efdf1504e8716a28cec2fd5782303.zip
Merge branch 'tari01-pr/ubports-patches'
Attributes GH PR #33: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/33
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 1dc8a8f..9c0d222 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,6 +14,11 @@ set_directory_properties (PROPERTIES
ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled)
set_source_files_properties (gschemas.compiled GENERATED)
+# make a XDG_DATA_HOME for sounds/
+set(XDG_DATA_HOME "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}")
+add_definitions(-DXDG_DATA_HOME="${XDG_DATA_HOME}")
+file(COPY "${CMAKE_SOURCE_DIR}/data/sounds" DESTINATION "${XDG_DATA_HOME}/${CMAKE_PROJECT_NAME}")
+
# GSettings:
# compile the ayatana-indicator-power schema into a gschemas.compiled file in this directory,
# and help the tests to find that file by setting -DSCHEMA_DIR
@@ -45,8 +50,8 @@ function(add_test_by_name name)
add_executable (${TEST_NAME} ${TEST_NAME}.cc)
target_link_options(${TEST_NAME} PRIVATE -no-pie)
add_test (${TEST_NAME} ${TEST_NAME})
- add_dependencies (${TEST_NAME} ayatanaindicatorpowerservice gschemas-compiled)
- target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
+ add_dependencies (${TEST_NAME} ${SERVICE_LIB} gschemas-compiled)
+ target_link_libraries (${TEST_NAME} ${SERVICE_LIB} ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
endfunction()
add_test_by_name(test-notify)
add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)