Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EIPScanner] add new port #43569

Merged
merged 14 commits into from
Feb 11, 2025
42 changes: 42 additions & 0 deletions ports/eipscanner/package_config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dc2bbb9..7cb7d7e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -65,6 +65,7 @@ set_target_properties(
SOVERSION ${EIPSCANNER_MAJOR_VERSION})

install(TARGETS EIPScanner EIPScannerS
+ EXPORT EIPScannerTargets
EfesX marked this conversation as resolved.
Show resolved Hide resolved
LIBRARY
DESTINATION lib
ARCHIVE
@@ -73,3 +74,28 @@ install(TARGETS EIPScanner EIPScannerS
install(DIRECTORY ${CMAKE_SOURCE_DIR}/src/
DESTINATION include/EIPScanner
FILES_MATCHING PATTERN "*.h*")
+
+
+include(CMakePackageConfigHelpers)
+configure_package_config_file(
+ ../cmake/EIPScannerConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/EIPScannerConfig.cmake
+ INSTALL_DESTINATION lib/cmake/eipscanner
+)
+
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/EIPScannerConfigVersion.cmake
+ VERSION ${PROJECT_VERSION}
+ COMPATIBILITY SameMajorVersion
+)
+
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/EIPScannerConfig.cmake
+ ${CMAKE_CURRENT_BINARY_DIR}/EIPScannerConfigVersion.cmake
+ DESTINATION lib/cmake/eipscanner
+)
+
+install(EXPORT EIPScannerTargets
+ FILE EIPScannerTargets.cmake
+ DESTINATION lib/cmake/eipscanner
+)
EfesX marked this conversation as resolved.
Show resolved Hide resolved
\ No newline at end of file
29 changes: 29 additions & 0 deletions ports/eipscanner/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
message(FATAL_ERROR "This port version is not supported on Windows.")
endif()

EfesX marked this conversation as resolved.
Show resolved Hide resolved
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nimbuscontrols/EIPScanner
REF ${VERSION}
SHA512 24612e6eec97aa67dfd83ec90d3f1a961c69a63a17cb09679b9eb453750049628def8d488b9debbf1f322a800f9f54933dedca9b37fb1c5703e95460b89f2f43
HEAD_REF master
PATCHES
targets.patch
package_config.patch
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
)

vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/eipscanner)
vcpkg_fixup_pkgconfig()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
12 changes: 12 additions & 0 deletions ports/eipscanner/targets.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/cmake/EIPScannerConfig.cmake.in b/cmake/EIPScannerConfig.cmake.in
new file mode 100644
index 0000000..3e16bd1
--- /dev/null
+++ b/cmake/EIPScannerConfig.cmake.in
@@ -0,0 +1,6 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/EIPScannerTargets.cmake")
+
+check_required_components(EIPScanner)
+
EfesX marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions ports/eipscanner/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The package EIPScanner provides CMake targets:

find_package(EIPScanner CONFIG REQUIRED)
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:EIPScanner>,EIPScanner,EIPScannerS>)
EfesX marked this conversation as resolved.
Show resolved Hide resolved
18 changes: 18 additions & 0 deletions ports/eipscanner/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "eipscanner",
"version": "1.3.0",
"description": "Free implementation of EtherNet/IP in C++ ",
"homepage": "https://eipscanner.readthedocs.io",
"license": "MIT",
"supports": "!windows",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,10 @@
"baseline": "3.4.0",
"port-version": 5
},
"eipscanner": {
"baseline": "1.3.0",
"port-version": 0
},
"elements": {
"baseline": "2024-09-12",
"port-version": 0
Expand Down
9 changes: 9 additions & 0 deletions versions/e-/eipscanner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "e9b8e8e20b0c9c8fd2e2c8a7bb9cfabed39b1c10",
"version": "1.3.0",
"port-version": 0
}
]
}