From 6904bda756321c67bea0108342fa9ba859dd66e9 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 13 May 2017 17:43:51 +0200 Subject: xmpp-vala: improve namespace handling, add some tests --- xmpp-vala/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'xmpp-vala/CMakeLists.txt') 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) -- cgit v1.2.3-70-g09d2