Explicitly link pthread
[pingcheck] / src / CMakeLists.txt
index d0bd59c..268d58f 100644 (file)
@@ -128,6 +128,7 @@ target_link_libraries(
     ${TARGET}
     ${Boost_LIBRARIES}
     ${I2NCOMMON_LIBRARIES}
+    pthread
 )
 
 # creates the install rule for the binary
@@ -136,6 +137,7 @@ install(TARGETS ${TARGET} DESTINATION bin)
 
 # create a library from the same files to feed into the linker for tools
 add_library(lib_for_tools STATIC ${SOURCES})
+target_link_libraries(lib_for_tools pthread)
 
 # now create an executable for tools/feed_packet_data that depends on lib_for_tools
 set(feed_packet_data_SOURCES tools/pcap.cpp tools/feed_packet_data.cpp)