From c9c91e1134352cee2f2509c01e15e23d589013d1 Mon Sep 17 00:00:00 2001 From: Denis Biryukov Date: Thu, 25 Jul 2024 11:30:21 +0200 Subject: [PATCH] Update CMakeLists.txt (#473) --- tests/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c247b1787..69e7e1530 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,8 @@ message(STATUS "zenoh-c tests") add_custom_target(tests) +find_package(Threads REQUIRED) + file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.c") foreach(file ${files}) get_filename_component(target ${file} NAME_WE) @@ -34,7 +36,7 @@ foreach(file ${files}) add_executable(${target} EXCLUDE_FROM_ALL ${file}) add_dependencies(tests ${target}) add_dependencies(${target} zenohc::lib) - target_link_libraries(${target} PRIVATE zenohc::lib) + target_link_libraries(${target} PRIVATE zenohc::lib Threads::Threads) copy_dlls(${target}) set_property(TARGET ${target} PROPERTY C_STANDARD 11) add_test(NAME "${test_type}_${target}" COMMAND ${target})