 +########################################
 +# library
 +add_library(${lib_name} STATIC ${${lib_name}_libsrcs})
-+target_link_libraries(${lib_name} ${EXPAT_LIBRARIES} ${OPENSSL_LIBRARIES})
++target_link_libraries(${lib_name} ${EXPAT_LIBRARIES} ${OPENSSL_LIBRARIES} ${SYS_LIBS})
 +target_include_directories(${lib_name} PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
 +  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
++  PRIVATE
++  $<BUILD_INTERFACE:${EXPAT_INCLUDE_DIRS}>
++  $<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>
 +  )
 +set_target_properties(${lib_name} PROPERTIES
 +  OUTPUT_NAME ${lib_name}${ver}

+else()
+  find_package(EXPAT)
+endif()
+if(EXPAT_FOUND)
+  include_directories(${EXPAT_INCLUDE_DIRS})
+else()
+  message(FATAL_ERROR "can't find expat - libstrophe cmake currently hard-coded to use expat")
+endif()
+########################################
+# version
+set(verString "^AC_INIT.*\\[\([.0-9]*\)\\].*")

+install(EXPORT ${targetsFile} DESTINATION lib/cmake)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 0000000..5bf5a5f
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,28 @@
+add_library(testlib STATIC test.c test.h)
+target_link_libraries(testlib libstrophe)
+set_property(TARGET testlib PROPERTY FOLDER tests)
+set(tests
+  check_parser
