aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-22 23:07:30 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-22 23:07:30 +0000
commit13525d7b0451f0a9ca7b73e83e2f374fbfb7c1bc (patch)
tree91d4d03a4980df9a072a371578c7c1993742e838 /tests/CMakeLists.txt
parent007ee3b3b425a31e31260c62baf789407bc8b54a (diff)
downloadayatana-indicator-sound-13525d7b0451f0a9ca7b73e83e2f374fbfb7c1bc.tar.gz
ayatana-indicator-sound-13525d7b0451f0a9ca7b73e83e2f374fbfb7c1bc.tar.bz2
ayatana-indicator-sound-13525d7b0451f0a9ca7b73e83e2f374fbfb7c1bc.zip
Fork from Ubuntu's indicator-sound.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index fb9d4b9..a332d0b 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -15,15 +15,20 @@ set_source_files_properties (gschemas.compiled GENERATED)
# and help the tests to find that file by setting -DSCHEMA_DIR
set (XDG_DATA_DIRS "${CMAKE_CURRENT_BINARY_DIR}/gsettings-schemas")
set (SCHEMA_DIR "${XDG_DATA_DIRS}/glib-2.0/schemas")
+if (EXISTS /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml)
+ set (SOUND_SCHEMA /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml)
+else()
+ set (SOUND_SCHEMA ${CMAKE_SOURCE_DIR}/data/org.ayatana.sound.gschema.xml)
+endif()
add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}")
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas
OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE
OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_command (OUTPUT gschemas.compiled
- DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.sound.gschema.xml
+ DEPENDS ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.sound.gschema.xml
COMMAND mkdir -p ${SCHEMA_DIR}
- COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR}
- COMMAND cp -f /usr/share/glib-2.0/schemas/com.ubuntu.sound.gschema.xml ${SCHEMA_DIR}
+ COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/org.ayatana.indicator.sound.gschema.xml ${SCHEMA_DIR}
+ COMMAND cp -f ${SOUND_SCHEMA} ${SCHEMA_DIR}
COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})
###########################
@@ -265,7 +270,7 @@ add_test(greeter-list-test-iterator
###########################
add_definitions(
- -DINDICATOR_SOUND_SERVICE_BINARY="${CMAKE_BINARY_DIR}/src/indicator-sound-service"
+ -DINDICATOR_SOUND_SERVICE_BINARY="${CMAKE_BINARY_DIR}/src/ayatana-indicator-sound-service"
-DPA_MOCK_LIB="${CMAKE_CURRENT_BINARY_DIR}/libpulse-mock.so"
)
add_executable (indicator-test indicator-test.cc gschemas.compiled)
@@ -281,7 +286,9 @@ add_test(indcator-test
indicator-test
)
+if(UNITY_API_FOUND)
add_subdirectory(integration)
+endif()
add_subdirectory(dbus-types)
add_subdirectory(service-mocks)