aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/CMakeLists.txt
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-05-13 17:43:51 +0200
committerMarvin W <git@larma.de>2017-08-12 11:59:38 +0200
commit6904bda756321c67bea0108342fa9ba859dd66e9 (patch)
tree24517bf54d6188af401afedd343c42b6ece3d1c6 /xmpp-vala/CMakeLists.txt
parentdd88db7556a20707f6fe3c81b3c58df42a0f5224 (diff)
downloaddino-6904bda756321c67bea0108342fa9ba859dd66e9.tar.gz
dino-6904bda756321c67bea0108342fa9ba859dd66e9.zip
xmpp-vala: improve namespace handling, add some tests
Diffstat (limited to 'xmpp-vala/CMakeLists.txt')
-rw-r--r--xmpp-vala/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmpp-vala/CMakeLists.txt b/xmpp-vala/CMakeLists.txt
index 779540cc..2e2287a6 100644
--- a/xmpp-vala/CMakeLists.txt
+++ b/xmpp-vala/CMakeLists.txt
@@ -85,3 +85,21 @@ set_target_properties(xmpp-vala PROPERTIES VERSION 0.1 SOVERSION 0)
install(TARGETS xmpp-vala ${TARGET_INSTALL})
install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.vapi ${CMAKE_BINARY_DIR}/exports/xmpp-vala.deps DESTINATION ${VAPI_INSTALL_DIR})
install(FILES ${CMAKE_BINARY_DIR}/exports/xmpp-vala.h DESTINATION ${INCLUDE_INSTALL_DIR})
+
+if(BUILD_TESTS)
+ vala_precompile(ENGINE_TEST_VALA_C
+ SOURCES
+ "tests/common.vala"
+ "tests/testcase.vala"
+
+ "tests/stanza.vala"
+ CUSTOM_VAPIS
+ ${CMAKE_BINARY_DIR}/exports/xmpp-vala_internal.vapi
+ PACKAGES
+ ${ENGINE_PACKAGES}
+ )
+
+ add_definitions(${VALA_CFLAGS})
+ add_executable(xmpp-vala-test ${ENGINE_TEST_VALA_C})
+ target_link_libraries(xmpp-vala-test xmpp-vala ${SIGNAL_PROTOCOL_PACKAGES})
+endif(BUILD_TESTS)