Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rpcapd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ if(WIN32 OR ((CMAKE_USE_PTHREADS_INIT OR PTHREADS_FOUND) AND HAVE_CRYPT))
OSX_ARCHITECTURES "${OSX_PROGRAM_ARCHITECTURES}")
endif()

if(WIN32)
if(WIN32 AND BUILD_SHARED_LIBS)
target_link_libraries(rpcapd ${LIBRARY_NAME}
${RPCAPD_LINK_LIBRARIES} ${PCAP_LINK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
else(WIN32)
else(WIN32 AND BUILD_SHARED_LIBS)
target_link_libraries(rpcapd ${LIBRARY_NAME}_static
${RPCAPD_LINK_LIBRARIES} ${PCAP_LINK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif(WIN32)
endif(WIN32 AND BUILD_SHARED_LIBS)
Comment on lines +115 to +121
Copy link
Author

@blackliner blackliner Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, why not link to ${LIBRARY_NAME}_static all the time? Like this:

target_link_libraries(rpcapd ${LIBRARY_NAME}_static
  ${RPCAPD_LINK_LIBRARIES} ${PCAP_LINK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})


######################################
# Install rpcap daemon and man pages
Expand Down