Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ports/open62541/CONTROL
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Source: open62541
Version: 0.3.0-4
Version: 1.0
Description: open62541 is an open source C (C99) implementation of OPC UA licensed under the Mozilla Public License v2.0.
Comment thread
yurybura marked this conversation as resolved.
16 changes: 16 additions & 0 deletions ports/open62541/fix-install-bindir.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d426e1da..09589b6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1151,7 +1151,7 @@ install(TARGETS open62541
EXPORT open62541Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
- RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
INCLUDES DESTINATION include)

if(UA_ENABLE_AMALGAMATION)
57 changes: 11 additions & 46 deletions ports/open62541/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,77 +1,42 @@
include(vcpkg_common_functions)
Comment thread
yurybura marked this conversation as resolved.
Outdated

if(NOT CMAKE_HOST_WIN32)
message("${PORT} currently requires the following tools from the system package manager:\n python-six\n\nThis can be installed on Ubuntu systems via apt-get install python-six python3-six (depending on your current python default interpreter)")
Comment thread
yurybura marked this conversation as resolved.
endif()

if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "${PORT} does not currently support UWP")
endif()
Comment thread
yurybura marked this conversation as resolved.
Outdated

set(VERSION v1.0)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO open62541/open62541
REF v0.3.0
SHA512 67766d226e1b900c0c37309099ecdbe987d10888ebf43f9066b21cf79f64d34e6ac30c2671a4901892f044859da4e8dbaa9fed5a49c633f73fef3bec75774050
REF ${VERSION}
SHA512 a1cc614147ee7fc0b4246abb0dd1a3405e330760c1d9d76980700853f136f7562690906cb428bae81232355d03f27c1cdc71da85e23e0cf16167f42d4faff93b
HEAD_REF master
PATCHES fix-install-bindir.patch
)

file(READ ${SOURCE_PATH}/CMakeLists.txt OPEN62541_CMAKELISTS)
string(REPLACE
"RUNTIME DESTINATION \${CMAKE_INSTALL_PREFIX}"
"RUNTIME DESTINATION \${BIN_INSTALL_DIR}"
OPEN62541_CMAKELISTS "${OPEN62541_CMAKELISTS}")
file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${OPEN62541_CMAKELISTS}")

if(CMAKE_HOST_WIN32)
set(EXECUTABLE_SUFFIX ".exe")
else()
set(EXECUTABLE_SUFFIX "")
endif()

vcpkg_find_acquire_program(PYTHON3)
Comment thread
yurybura marked this conversation as resolved.
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

if(CMAKE_HOST_WIN32)
# Must not modify system copy of python3 -- on CMAKE_HOST_WIN32, we have our own private copy
if(NOT EXISTS ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX})
if(NOT EXISTS ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX})
get_filename_component(PYTHON3_DIR_NAME "${PYTHON3_DIR}" NAME)
vcpkg_download_distfile(GET_PIP
URLS "https://bootstrap.pypa.io/3.3/get-pip.py"
FILENAME "tools/python/${PYTHON3_DIR_NAME}/get-pip.py"
SHA512 92e68525830bb23955a31cb19ebc3021ef16b6337eab83d5db2961b791283d2867207545faf83635f6027f2f7b7f8fee2c85f2cfd8e8267df25406474571c741
)
execute_process(COMMAND ${PYTHON3_DIR}/python${EXECUTABLE_SUFFIX} ${GET_PIP})
endif()
execute_process(COMMAND ${PYTHON3_DIR}/Scripts/pip${EXECUTABLE_SUFFIX} install six)
else()
execute_process(COMMAND ${PYTHON3_DIR}/easy_install${EXECUTABLE_SUFFIX} six)
endif()
endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DBIN_INSTALL_DIR:STRING=bin
-DOPEN62541_VERSION=${VERSION}
OPTIONS_DEBUG
-DCMAKE_DEBUG_POSTFIX=d
)

vcpkg_install_cmake()

if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/cmake/${PORT})
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
else()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake)
endif()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/share/open62541/tools)

vcpkg_copy_pdbs()

file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

# CMake integration test
vcpkg_test_cmake(PACKAGE_NAME ${PORT})
Comment thread
yurybura marked this conversation as resolved.
Outdated
1 change: 0 additions & 1 deletion scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,6 @@ ompl:x64-osx=fail
ompl:x64-linux=ignore
open62541:arm-uwp=fail
open62541:x64-uwp=fail
open62541:x64-osx=fail
openal-soft:arm-uwp=fail
openal-soft:x64-uwp=fail
openblas:arm64-windows=fail
Expand Down