Skip to content

Commit dd4bd37

Browse files
committed
Fixed CMakeLists.txt for tests
Fixed libraries to link, so ld will not fail on Linux with: 'missing DSO' because of missing libpthread.
1 parent 550adae commit dd4bd37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/network/test/http/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ if (Boost_FOUND)
8484
add_dependencies(cpp-netlib-http-server_async_run_stop_concurrency
8585
cppnetlib-server-parsers)
8686
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency
87-
${Boost_LIBRARIES} cppnetlib-server-parsers)
87+
${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} cppnetlib-server-parsers)
8888
if (OPENSSL_FOUND)
8989
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency
9090
${OPENSSL_LIBRARIES})
@@ -95,7 +95,7 @@ if (Boost_FOUND)
9595
ws2_32 wsock32)
9696
endif()
9797
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
98-
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency rt)
98+
target_link_libraries(cpp-netlib-http-server_async_run_stop_concurrency pthread rt)
9999
endif()
100100
set_target_properties(cpp-netlib-http-server_async_run_stop_concurrency
101101
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CPP-NETLIB_BINARY_DIR}/tests)

0 commit comments

Comments
 (0)