aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/CMakeLists.txt
diff options
context:
space:
mode:
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)