2023-12-05 08:38:12 +08:00
|
|
|
# https://github.com/eProsima/Fast-DDS/pull/3983
|
|
|
|
# Could remove after 2.6.6/2.10.2/2.11.2, other minor versions not applied
|
|
|
|
# Could remove after 2.13 released, or any newer mijor versions
|
|
|
|
vcpkg_download_distfile(
|
|
|
|
PR_3983_PATCH
|
|
|
|
URLS https://github.com/eProsima/Fast-DDS/commit/2601e95429f5676c47c25200e995fb93157e7815.patch?full_index=1
|
|
|
|
SHA512 440ee6a918d7085b6520613fad1482a9b833ee259e64c8919bdeb43277f3685362e6314380bafc6c51dad46fd16a9b415343e9db28f157d13f76b9af0cb21e8d
|
|
|
|
FILENAME fastrtps-2601e95429f5676c47c25200e995fb93157e7815.patch
|
|
|
|
)
|
|
|
|
|
2018-04-20 07:17:35 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-05 03:20:25 +08:00
|
|
|
REPO eProsima/Fast-DDS
|
2022-07-12 07:08:31 +08:00
|
|
|
REF v2.7.0
|
|
|
|
SHA512 289c94fb177209ffc80e93ae61822c83e7cb74ba7682f05a921c50ce048498bd811c19825d1fdb8af39b29a64904e96d87c5c59468139f0d8bb528549b80c94a
|
2018-04-20 07:17:35 +08:00
|
|
|
HEAD_REF master
|
2021-10-14 05:39:39 +08:00
|
|
|
PATCHES
|
|
|
|
fix-find-package-asio.patch
|
|
|
|
disable-symlink.patch
|
2023-04-14 12:48:43 +08:00
|
|
|
fix-xtime.patch
|
2023-10-21 01:00:10 +08:00
|
|
|
fix_thread.patch #https://github.com/eProsima/Fast-DDS/pull/3904
|
2023-12-05 08:38:12 +08:00
|
|
|
"${PR_3983_PATCH}"
|
2018-04-20 07:17:35 +08:00
|
|
|
)
|
|
|
|
|
2021-10-14 05:39:39 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-09-06 13:38:10 +08:00
|
|
|
DISABLE_PARALLEL_CONFIGURE # due to fix-xtime.patch
|
2018-04-20 07:17:35 +08:00
|
|
|
)
|
|
|
|
|
2021-10-14 05:39:39 +08:00
|
|
|
vcpkg_cmake_install()
|
2018-04-20 07:17:35 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2021-10-14 05:39:39 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH share/fastrtps/cmake)
|
2018-04-20 07:17:35 +08:00
|
|
|
|
2021-10-14 05:39:39 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
# copy tools from "bin" to "tools" folder
|
|
|
|
foreach(TOOL "fast-discovery-server-1.0.0.exe" "fast-discovery-server.bat" "fastdds.bat" "ros-discovery.bat")
|
|
|
|
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${TOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${TOOL}")
|
|
|
|
endforeach()
|
2018-04-20 07:17:35 +08:00
|
|
|
|
2021-10-14 05:39:39 +08:00
|
|
|
# remove tools from debug builds
|
|
|
|
foreach(TOOL "fast-discovery-serverd-1.0.0.exe" "fast-discovery-server.bat" "fastdds.bat" "ros-discovery.bat")
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL}")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL}")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# adjust paths in batch files
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/fastdds.bat" "%dir%\\..\\tools\\fastdds\\fastdds.py" "%dir%\\..\\fastdds\\fastdds.py")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/ros-discovery.bat" "%dir%\\..\\tools\\fastdds\\fastdds.py" "%dir%\\..\\fastdds\\fastdds.py")
|
|
|
|
|
|
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
elseif(VCPKG_TARGET_IS_LINUX)
|
|
|
|
# copy tools from "bin" to "tools" folder
|
|
|
|
foreach(TOOL "fast-discovery-server-1.0.0" "fast-discovery-server" "fastdds" "ros-discovery")
|
|
|
|
file(INSTALL "${CURRENT_PACKAGES_DIR}/bin/${TOOL}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/bin/${TOOL}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# replace symlink by a copy because symlinks do not work well together with vcpkg binary caching
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/tools/${PORT}/fast-discovery-server")
|
|
|
|
file(INSTALL "${CURRENT_PACKAGES_DIR}/tools/${PORT}/fast-discovery-server-1.0.0" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}" RENAME "fast-discovery-server")
|
|
|
|
|
|
|
|
# remove tools from debug builds
|
|
|
|
foreach(TOOL "fast-discovery-serverd-1.0.0" "fast-discovery-server" "fastdds" "ros-discovery")
|
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/bin/${TOOL}")
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
# adjust paths in batch files
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/fastdds" "$dir/../tools/fastdds/fastdds.py" "$dir/../fastdds/fastdds.py")
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/ros-discovery" "$dir/../tools/fastdds/fastdds.py" "$dir/../fastdds/fastdds.py")
|
|
|
|
endif()
|
|
|
|
|
2022-07-12 07:08:31 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/fastdds/discovery/parser.py" "tool_path / '../../../bin'" "tool_path / '../../${PORT}'")
|
|
|
|
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
2021-10-14 05:39:39 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2022-07-12 07:08:31 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/tools")
|
2021-10-14 05:39:39 +08:00
|
|
|
|
2023-04-14 12:48:43 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|