From 6317176d7e890292cb40d6add96a1c81e8eeb08f Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Thu, 21 May 2020 23:52:19 +0100 Subject: More CMake cleanup --- tests/Network/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/Network') diff --git a/tests/Network/CMakeLists.txt b/tests/Network/CMakeLists.txt index 12759558e..8bbe6294d 100644 --- a/tests/Network/CMakeLists.txt +++ b/tests/Network/CMakeLists.txt @@ -1,6 +1,8 @@ include_directories(${CMAKE_SOURCE_DIR}/src/) include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/lib/mbedtls/include) +find_package(Threads REQUIRED) + # Create a single Network library that contains all the networking code: set (Network_SRCS ${CMAKE_SOURCE_DIR}/src/OSSupport/CriticalSection.cpp @@ -54,10 +56,8 @@ add_library(Network ) target_link_libraries(Network event_core event_extra fmt::fmt mbedtls) -if (WIN32) - target_link_libraries(Network ws2_32.lib) -else() - target_link_libraries(Network event_pthreads_static) +if(NOT WIN32) + target_link_libraries(Network event_pthreads Threads::Threads) endif() -- cgit v1.2.3