diff options
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 9 |
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) |