~dobey/indicator-datetime/build-parallel

« back to all changes in this revision

Viewing changes to tests/CMakeLists.txt

  • Committer: Charles Kerr
  • Date: 2013-10-18 19:22:54 UTC
  • mto: This revision was merged to the branch mainline in revision 281.
  • Revision ID: charles.kerr@canonical.com-20131018192254-mga1w5zccemycadl
replace autotools with cmake

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# build the necessary schemas
 
2
set_directory_properties (PROPERTIES
 
3
                          ADDITIONAL_MAKE_CLEAN_FILES gschemas.compiled)
 
4
set_source_files_properties (gschemas.compiled GENERATED)
 
5
 
 
6
# GSettings:
 
7
# compile the indicator-datetime schema into a gschemas.compiled file in this directory,
 
8
# and help the tests to find that file by setting -DSCHEMA_DIR
 
9
set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR})
 
10
add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}")
 
11
execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas
 
12
                 OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE
 
13
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
 
14
add_custom_command (OUTPUT gschemas.compiled
 
15
                    DEPENDS ${CMAKE_SOURCE_DIR}/data/com.canonical.indicator.session.gschema.xml
 
16
                    COMMAND cp -f ${CMAKE_SOURCE_DIR}/data/*gschema.xml ${SCHEMA_DIR}
 
17
                    COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR})
 
18
 
 
19
# look for hearder in our src dir, and also in the directories where we autogenerate files...
 
20
include_directories (${CMAKE_SOURCE_DIR}/src)
 
21
include_directories (${CMAKE_CURRENT_BINARY_DIR} ${SERVICE_INCLUDE_DIRS})
 
22
 
 
23