mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 15:19:03 +08:00
fc5134c3a2
* initial SOEM port. * don't use the vendored winpcap. * removed the unused flag. * addressed feedback. * addressed feedback.
24 lines
921 B
Diff
24 lines
921 B
Diff
--- CMakeLists.txt
|
|
+++ CMakeLists.txt
|
|
@@ -13,15 +13,13 @@
|
|
|
|
if(WIN32)
|
|
set(OS "win32")
|
|
- include_directories(oshw/win32/wpcap/Include)
|
|
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
- link_directories(${CMAKE_SOURCE_DIR}/oshw/win32/wpcap/Lib/x64)
|
|
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
- link_directories(${CMAKE_SOURCE_DIR}/oshw/win32/wpcap/Lib)
|
|
- endif()
|
|
+ find_path(winpcap_INCLUDE_DIRS NAMES pcap.h)
|
|
+ find_library(winpcap_LIBRARY NAMES wpcap)
|
|
+ find_library(packet_LIBRARY NAMES packet)
|
|
+ include_directories(${winpcap_INCLUDE_DIRS})
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_NO_WARNINGS")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
|
|
- set(OS_LIBS wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
|
|
+ set(OS_LIBS ${winpcap_LIBRARY} ${packet_LIBRARY} Ws2_32.lib Winmm.lib)
|
|
elseif(UNIX AND NOT APPLE)
|
|
set(OS "linux")
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror")
|