aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
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)