[ompl] no absolute paths (#21104)

This commit is contained in:
autoantwort 2021-11-04 20:18:43 +01:00 committed by GitHub
parent 0032024513
commit 058dea025e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 28 deletions

View File

@ -2,30 +2,23 @@ vcpkg_buildpath_length_warning(37)
set(OMPL_VERSION 1.5.1)
vcpkg_download_distfile(ARCHIVE
URLS "https://github.com/ompl/ompl/archive/1.5.1.tar.gz"
FILENAME "ompl-${OMPL_VERSION}.tar.gz"
SHA512 2f28d29f32f3bb03e67b29ce251e4786364847a25e3c4cf66d7663ed38dca4da71d4e03cf9ce647710d9524a3907c76c09795e77f041cb8822f695d28f5ca570
)
vcpkg_extract_source_archive_ex(
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${OMPL_VERSION}
REPO ompl/ompl
REF 1.5.1
SHA512 2f28d29f32f3bb03e67b29ce251e4786364847a25e3c4cf66d7663ed38dca4da71d4e03cf9ce647710d9524a3907c76c09795e77f041cb8822f695d28f5ca570
HEAD_REF master
PATCHES
0001_Export_targets.patch
0002_Fix_config.patch
)
# Based on selected features different files get downloaded, so use the following command instead of patch.
file(READ ${SOURCE_PATH}/CMakeLists.txt _contents)
string(REPLACE "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)" _contents "${_contents}")
string(REPLACE "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)" _contents "${_contents}")
file(WRITE ${SOURCE_PATH}/CMakeLists.txt "${_contents}")
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "find_package(Eigen3 REQUIRED)" "find_package(Eigen3 REQUIRED CONFIG)")
vcpkg_replace_string("${SOURCE_PATH}/CMakeLists.txt" "find_package(ccd REQUIRED)" "find_package(ccd REQUIRED CONFIG)")
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DOMPL_VERSIONED_INSTALL=OFF
@ -36,18 +29,19 @@ vcpkg_configure_cmake(
-DOMPL_BUILD_PYTESTS=OFF
)
vcpkg_install_cmake()
vcpkg_cmake_install()
vcpkg_fixup_cmake_targets(CONFIG_PATH share/ompl/cmake)
vcpkg_cmake_config_fixup(CONFIG_PATH share/ompl/cmake)
vcpkg_fixup_pkgconfig()
# Remove debug distribution and other, move ompl_benchmark to tools/ dir
file(REMOVE_RECURSE
${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/share
${CURRENT_PACKAGES_DIR}/share/man
${CURRENT_PACKAGES_DIR}/share/ompl/demos
${CURRENT_PACKAGES_DIR}/share/ompl/ompl.conf
${CURRENT_PACKAGES_DIR}/share/ompl/plannerarena
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/share/man"
"${CURRENT_PACKAGES_DIR}/share/ompl/demos"
"${CURRENT_PACKAGES_DIR}/share/ompl/ompl.conf"
"${CURRENT_PACKAGES_DIR}/share/ompl/plannerarena"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
@ -55,4 +49,4 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
endif()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,7 @@
{
"name": "ompl",
"version-string": "1.5.1",
"port-version": 2,
"port-version": 3,
"description": "The Open Motion Planning Library, consists of many state-of-the-art sampling-based motion planning algorithms",
"homepage": "https://ompl.kavrakilab.org/",
"dependencies": [
@ -15,6 +15,14 @@
"boost-test",
"boost-timer",
"boost-ublas",
"eigen3"
"eigen3",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -4802,7 +4802,7 @@
},
"ompl": {
"baseline": "1.5.1",
"port-version": 2
"port-version": 3
},
"omplapp": {
"baseline": "1.5.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4385de7645c202d99bb25420d049f15cb54d9ed7",
"version-string": "1.5.1",
"port-version": 3
},
{
"git-tree": "87e475355f626557d8762d014c7f0efa2d2d488e",
"version-string": "1.5.1",