Skip to content

Commit 07c0693

Browse files
committed
Fix threading library handling
1 parent fbc54a9 commit 07c0693

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ target_link_libraries(netflow_plugin ipfix_rfc)
9191
add_library(pcap_plugin STATIC pcap_plugin/pcap_collector.cpp)
9292
target_link_libraries(pcap_plugin pcap)
9393

94+
find_package(Threads)
95+
9496
if (ENABLE_PFRING_SUPPORT)
9597
add_library(pfring_plugin STATIC pfring_plugin/pfring_collector.cpp)
9698
target_link_libraries(pfring_plugin ${PFRING_LIBRARIES})
9799
target_link_libraries(pfring_plugin numa)
98-
target_link_libraries(pfring_plugin pthread)
100+
target_link_libraries(pfring_plugin ${CMAKE_THREAD_LIBS_INIT})
99101
endif()
100102

101103
# example plugin
@@ -169,7 +171,7 @@ endif()
169171

170172
target_link_libraries(fastnetmon ${LOG4CPP_LIBRARY_PATH})
171173

172-
target_link_libraries(fastnetmon pthread)
174+
target_link_libraries(fastnetmon ${CMAKE_THREAD_LIBS_INIT})
173175

174176
# Our libs
175177
target_link_libraries(fastnetmon patricia)

0 commit comments

Comments
 (0)