Renamend tests and let them use the interface of the libs
@@ -2,32 +2,30 @@ FILE (GLOB XML_FILES
${CMAKE_CURRENT_SOURCE_DIR}/testdata/*.xml
)
+ADD_EXECUTABLE (test-ixml-shared
test_document.c
)
-TARGET_INCLUDE_DIRECTORIES (test_ixml_shared
- PRIVATE ${UPNP_SOURCE_DIR}/ixml/inc
- PRIVATE ${UPNP_SOURCE_DIR}/upnp/inc
+TARGET_LINK_LIBRARIES (test-ixml-shared
+ PRIVATE ixml_shared
)
ADD_TEST (NAME test-ixml
COMMAND test-ixml-shared ${XML_FILES}
-TARGET_LINK_LIBRARIES (test_ixml_shared
- ixml_shared
)
-ADD_EXECUTABLE (test_ixml_static
- EXCLUDE_FROM_ALL
+SET_TESTS_PROPERTIES (test-ixml PROPERTIES
+ ENVIRONMENT "PATH=$<TARGET_FILE_DIR:ixml_shared>\;%PATH%"
+)
+
+ADD_EXECUTABLE (test-ixml-static
test_document.c
)
-TARGET_INCLUDE_DIRECTORIES (test_ixml_static
- PRIVATE ${UPNP_SOURCE_DIR}/ixml/inc
- PRIVATE ${UPNP_SOURCE_DIR}/upnp/inc
+TARGET_LINK_LIBRARIES (test-ixml-static
+ PRIVATE ixml_static
)
ADD_TEST (NAME test-ixml-static
COMMAND test-ixml-static ${XML_FILES}
-TARGET_LINK_LIBRARIES (test_ixml_static
- ixml_static
)
