This is an automated email from the ASF dual-hosted git repository.

abroekhuis pushed a commit to branch feature/explicit_zmq_linking_for_test
in repository https://gitbox.apache.org/repos/asf/celix.git

commit 7a63b4a818be1261ef6926f4370a087920db624f
Author: Alexander Broekhuis <alexander.broekh...@luminis.eu>
AuthorDate: Wed May 20 11:43:39 2020 +0200

    Added explicit linking for zmq and czmq to pubsub tests, so that fixed 
library paths are used.
---
 bundles/pubsub/test/CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/bundles/pubsub/test/CMakeLists.txt 
b/bundles/pubsub/test/CMakeLists.txt
index e8b35f9..9282aca 100644
--- a/bundles/pubsub/test/CMakeLists.txt
+++ b/bundles/pubsub/test/CMakeLists.txt
@@ -202,6 +202,9 @@ if (BUILD_PUBSUB_PSA_WS)
     endif()
 
 if (BUILD_PUBSUB_PSA_ZMQ)
+    find_package(ZMQ REQUIRED)
+    find_package(CZMQ REQUIRED)
+
     add_celix_container(pubsub_zmq_tests
             USE_CONFIG #ensures that a config.properties will be created with 
the launch bundles.
             LAUNCHER_SRC ${CMAKE_CURRENT_LIST_DIR}/test/test_runner.cc
@@ -217,7 +220,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
                 pubsub_tst
     )
 
-    target_link_libraries(pubsub_zmq_tests PRIVATE Celix::pubsub_api 
${CppUTest_LIBRARIES} Jansson Celix::dfi)
+    target_link_libraries(pubsub_zmq_tests PRIVATE Celix::pubsub_api 
${CppUTest_LIBRARIES} Jansson Celix::dfi ZMQ::lib CZMQ::lib)
     target_include_directories(pubsub_zmq_tests SYSTEM PRIVATE 
${CppUTest_INCLUDE_DIR} test)
     add_test(NAME pubsub_zmq_tests COMMAND pubsub_zmq_tests WORKING_DIRECTORY 
$<TARGET_PROPERTY:pubsub_zmq_tests,CONTAINER_LOC>)
     setup_target_for_coverage(pubsub_zmq_tests SCAN_DIR ..)
@@ -240,7 +243,7 @@ if (BUILD_PUBSUB_PSA_ZMQ)
                 pubsub_sut
                 pubsub_tst
     )
-    target_link_libraries(pubsub_zmq_zerocopy_tests PRIVATE Celix::pubsub_api 
${CppUTest_LIBRARIES} Jansson Celix::dfi)
+    target_link_libraries(pubsub_zmq_zerocopy_tests PRIVATE Celix::pubsub_api 
${CppUTest_LIBRARIES} Jansson Celix::dfi ZMQ::lib CZMQ::lib)
     target_include_directories(pubsub_zmq_zerocopy_tests SYSTEM PRIVATE 
${CppUTest_INCLUDE_DIR} test)
 
     #TODO fix issues with ZeroCopy and reanble test again

Reply via email to