Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

blackliner
Copy link

@blackliner blackliner commented Oct 25, 2021

Currently, the build system tries to link rpcapd to the shared version of libpcap unconditionally, but this library is not created in a static build -DBUILD_SHARED_LIBS=OFF

Why don't you just link to the static version all the time, did you have any issues in the past?

Currently, the build system tries to link `rpcapd ` to the shared version of `libpcap` unconditionally, but this library is not created in a static build `-DBUILD_SHARED_LIBS=OFF`
Comment on lines +115 to +121
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)
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})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.