diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 12 | ||||
-rw-r--r-- | test/Makefile.am | 30 |
2 files changed, 12 insertions, 30 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..78d8965 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1,12 @@ +# cups-notifier.h +# cups-notifier.c +include (GdbusCodegen) +add_gdbus_codegen_with_namespace (CUPS_NOTIFIER cups-notifier org.cups.cupsd Cups "${CMAKE_SOURCE_DIR}/src/org.cups.cupsd.Notifier.xml") + +# mock-cups-notifier +add_executable (mock-cups-notifier mock-cups-notifier.c ${CUPS_NOTIFIER}) +target_include_directories (mock-cups-notifier PUBLIC ${SERVICE_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries (mock-cups-notifier ${SERVICE_LIBRARIES}) +add_test (mock-cups-notifier mock-cups-notifier) + + diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index 0ecb702..0000000 --- a/test/Makefile.am +++ /dev/null @@ -1,30 +0,0 @@ -noinst_PROGRAMS = mock-cups-notifier -DISTCLEANFILES = mock-cups-notifier - -cups_notifier_sources = \ - cups-notifier.c \ - cups-notifier.h - -$(cups_notifier_sources): $(top_srcdir)/src/org.cups.cupsd.Notifier.xml - gdbus-codegen \ - --interface-prefix org.cups.cupsd \ - --c-namespace Cups \ - --generate-c-code cups-notifier \ - $^ - -mock_cups_notifier_SOURCES = \ - mock-cups-notifier.c - -nodist_mock_cups_notifier_SOURCES = $(cups_notifier_sources) - -mock_cups_notifier_CPPFLAGS = \ - $(SERVICE_CFLAGS) \ - -I$(top_builddir)/src - -mock_cups_notifier_LDADD = $(SERVICE_LIBS) - -BUILT_SOURCES = $(cups_notifier_sources) -CLEANFILES = $(BUILT_SOURCES) - -DISTCLEANFILES = \ - Makefile.in
\ No newline at end of file |