diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-30 23:49:58 +0000 |
---|---|---|
committer | Tarmac <Unknown> | 2013-10-30 23:49:58 +0000 |
commit | bbc781d9e2afe500d9a5d09335f0954f25269be6 (patch) | |
tree | 87ad870ab7d39777686e4f9661bcaa4ba41b5e1d /tests/CMakeLists.txt | |
parent | 19ba64b479fd14d5192f0ec3dcc37fe33bde238b (diff) | |
parent | 13cc891202d3721fc157c827ed1141ee6221ccbd (diff) | |
download | ayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.tar.gz ayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.tar.bz2 ayatana-indicator-datetime-bbc781d9e2afe500d9a5d09335f0954f25269be6.zip |
Switch the build system to cmake. Fixes: https://bugs.launchpad.net/bugs/1237509.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..682896b --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,23 @@ +# build the necessary schemas +set_directory_properties (PROPERTIES + ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled) +set_source_files_properties (gschemas.compiled GENERATED) + +# GSettings: +# compile the indicator-datetime schema into a gschemas.compiled file in this directory, +# and help the tests to find that file by setting -DSCHEMA_DIR +set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) +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.session.gschema.xml + COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR} + COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) + +# look for hearder in our src dir, and also in the directories where we autogenerate files... +include_directories (${CMAKE_SOURCE_DIR}/src) +include_directories (${CMAKE_CURRENT_BINARY_DIR} ${SERVICE_INCLUDE_DIRS}) + + |