mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
[soem] Add new port (#9572)
* initial SOEM port. * don't use the vendored winpcap. * removed the unused flag. * addressed feedback. * addressed feedback.
This commit is contained in:
parent
a982079028
commit
fc5134c3a2
5
ports/soem/CONTROL
Normal file
5
ports/soem/CONTROL
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
Source: soem
|
||||||
|
Version: 1.4.0
|
||||||
|
Homepage: https://github.com/OpenEtherCATsociety/SOEM
|
||||||
|
Description: Simple Open Source EtherCAT Master
|
||||||
|
Build-Depends: winpcap (windows)
|
29
ports/soem/portfile.cmake
Normal file
29
ports/soem/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||||
|
|
||||||
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||||
|
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO OpenEtherCATsociety/SOEM
|
||||||
|
REF abbf0d42e38d6cfbaa4c1e9e8e07ace651c386fd #v1.4.0
|
||||||
|
SHA512 2967775c6746bb63becea5eb12f136c184bbf874e1e5e8753374bfc212ec9cefbf1159350e79627b978af3562d261b61c50f38936a425c4d9c70598a1d136817
|
||||||
|
HEAD_REF master
|
||||||
|
PATCHES
|
||||||
|
winpcap.patch
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PREFER_NINJA
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
|
vcpkg_copy_pdbs()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE
|
||||||
|
${CURRENT_PACKAGES_DIR}/bin
|
||||||
|
${CURRENT_PACKAGES_DIR}/debug/bin
|
||||||
|
${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
|
||||||
|
# Handle copyright
|
||||||
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
23
ports/soem/winpcap.patch
Normal file
23
ports/soem/winpcap.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- 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")
|
@ -1562,6 +1562,8 @@ smpeg2:x64-linux=fail
|
|||||||
smpeg2:x64-uwp=fail
|
smpeg2:x64-uwp=fail
|
||||||
soci:arm-uwp=fail
|
soci:arm-uwp=fail
|
||||||
soci:x64-uwp=fail
|
soci:x64-uwp=fail
|
||||||
|
soem:x64-uwp=fail
|
||||||
|
soem:arm-uwp=fail
|
||||||
soil:arm-uwp=fail
|
soil:arm-uwp=fail
|
||||||
soil:x64-uwp=fail
|
soil:x64-uwp=fail
|
||||||
soil2:arm-uwp=fail
|
soil2:arm-uwp=fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user