diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-10-18 14:22:54 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-10-18 14:22:54 -0500 |
commit | 62d01fc8749606d8fc4614d897044462a6d703fc (patch) | |
tree | eaf3165deadf86420b9256c3055220315c9d419e /tests | |
parent | 99f3bc0685f85744081eefa0c22d9f7c5b13f327 (diff) | |
download | ayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.tar.gz ayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.tar.bz2 ayatana-indicator-datetime-62d01fc8749606d8fc4614d897044462a6d703fc.zip |
replace autotools with cmake
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 23 | ||||
-rw-r--r-- | tests/Makefile.am | 58 |
2 files changed, 23 insertions, 58 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}) + + diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index e204378..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,58 +0,0 @@ -TESTS = -CLEANFILES = -BUILT_SOURCES = -check_PROGRAMS = - -### -### -### - -# stock UMB tests on user-visible strings -include $(srcdir)/Makefile.am.strings - -check_LIBRARIES = libgtest.a -nodist_libgtest_a_SOURCES = \ - $(GTEST_SOURCE)/gtest-all.cc \ - $(GTEST_SOURCE)/gtest_main.cc - -AM_CPPFLAGS = $(GTEST_CPPFLAGS) -I${top_srcdir}/src -Wall -Werror -AM_CXXFLAGS = $(GTEST_CXXFLAGS) - -### -### -### - -TEST_LIBS = \ - libgtest.a \ - $(SERVICE_LIBS) \ - $(COVERAGE_LDFLAGS) \ - $(XORG_GTEST_LDFLAGS) - -TEST_CPPFLAGS = \ - $(AM_CPPFLAGS) \ - $(SERVICE_CFLAGS) - -BUILT_SOURCES += gschemas.compiled -CLEANFILES += gschemas.compiled -gschemas.compiled: Makefile - @glib-compile-schemas --targetdir=$(abs_builddir) $(top_builddir)/data - -### -### -### - -TESTS += test-indicator -check_PROGRAMS += test-indicator -test_indicator_SOURCES = test-indicator.cc -test_indicator_LDADD = $(TEST_LIBS) -test_indicator_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\"" - -### -### -### - -TESTS += test-utils -check_PROGRAMS += test-utils -test_utils_SOURCES = test-utils.cc -test_utils_LDADD = $(top_builddir)/src/libindicator-datetime-service.a $(TEST_LIBS) -test_utils_CPPFLAGS = $(TEST_CPPFLAGS) -DSCHEMA_DIR="\"$(top_builddir)/tests/\"" |