libpcap: enable windows (#5436)
* libpcap: enable windows * set precompiled false * fix mingw * fix precompiled * add patch for mingw * fix msys flex bisonpull/5448/head
parent
ac8c8da1ad
commit
25314b389f
6 changed files with 109 additions and 12 deletions
@ -0,0 +1,21 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 851b3cc9..cc2bc97f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -3221,13 +3221,16 @@ if(WIN32)
|
||||
# For compatibility, build the shared library without the "lib" prefix on
|
||||
# MinGW as well.
|
||||
#
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
set_target_properties(${LIBRARY_NAME} PROPERTIES
|
||||
PREFIX ""
|
||||
OUTPUT_NAME "${LIBRARY_NAME}"
|
||||
)
|
||||
+ else()
|
||||
set_target_properties(${LIBRARY_NAME}_static PROPERTIES
|
||||
OUTPUT_NAME "${LIBRARY_NAME}"
|
||||
)
|
||||
+ endif()
|
||||
endif()
|
||||
else(WIN32) # UN*X
|
||||
if(BUILD_SHARED_LIBS)
|
@ -0,0 +1,30 @@ |
||||
diff --git a/rpcapd/CMakeLists.txt b/rpcapd/CMakeLists.txt
|
||||
index 555d6d40..7446687e 100644
|
||||
--- a/rpcapd/CMakeLists.txt
|
||||
+++ b/rpcapd/CMakeLists.txt
|
||||
@@ -87,13 +87,13 @@ if(WIN32 OR ((CMAKE_USE_PTHREADS_INIT OR PTHREADS_FOUND) AND HAVE_CRYPT))
|
||||
OSX_ARCHITECTURES "${OSX_EXECUTABLE_ARCHITECTURES}")
|
||||
endif()
|
||||
|
||||
- if(WIN32)
|
||||
+ if(BUILD_SHARED_LIBS)
|
||||
target_link_libraries(rpcapd ${LIBRARY_NAME}
|
||||
${RPCAPD_LINK_LIBRARIES} ${PCAP_LINK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
- else(WIN32)
|
||||
+ else(BUILD_SHARED_LIBS)
|
||||
target_link_libraries(rpcapd ${LIBRARY_NAME}_static
|
||||
${RPCAPD_LINK_LIBRARIES} ${PCAP_LINK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||
- endif(WIN32)
|
||||
+ endif(BUILD_SHARED_LIBS)
|
||||
|
||||
######################################
|
||||
# Install rpcap daemon and man pages
|
||||
@@ -119,7 +119,7 @@ if(WIN32 OR ((CMAKE_USE_PTHREADS_INIT OR PTHREADS_FOUND) AND HAVE_CRYPT))
|
||||
# will determine where it goes.
|
||||
#
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
- install(TARGETS rpcapd DESTINATION bin/amd64)
|
||||
+ install(TARGETS rpcapd DESTINATION bin)
|
||||
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
install(TARGETS rpcapd DESTINATION bin)
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
Loading…
Reference in new issue