[sdformat6] no absolute paths (#21305)

This commit is contained in:
autoantwort 2021-11-11 22:36:14 +01:00 committed by GitHub
parent 756f184553
commit f975585427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 20 deletions

View File

@ -16,41 +16,43 @@ get_filename_component(RUBY_PATH ${RUBY} DIRECTORY)
set(_path $ENV{PATH})
vcpkg_add_to_path(${RUBY_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS -DBUILD_TESTING=OFF
-DUSE_EXTERNAL_URDF=ON
-DUSE_EXTERNAL_TINYXML=ON
)
vcpkg_install_cmake()
vcpkg_cmake_install()
# Restore original path
set(ENV{PATH} ${_path})
# Move location of sdformat.dll from lib to bin
if(EXISTS ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/sdformat.dll
${CURRENT_PACKAGES_DIR}/bin/sdformat.dll)
if(EXISTS "${CURRENT_PACKAGES_DIR}/lib/sdformat.dll")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/sdformat.dll"
"${CURRENT_PACKAGES_DIR}/bin/sdformat.dll")
endif()
if(EXISTS ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll)
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll
${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll)
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/sdformat.dll"
"${CURRENT_PACKAGES_DIR}/debug/bin/sdformat.dll")
endif()
# Fix cmake targets location
vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/sdformat")
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sdformat")
# Remove debug files
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include
${CURRENT_PACKAGES_DIR}/debug/lib/cmake
${CURRENT_PACKAGES_DIR}/debug/share)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/lib/cmake"
"${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/ignition/sdformat6.yaml" "${CURRENT_PACKAGES_DIR}" "../..")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sdformat-6.2/sdf/sdf_config.h" "#define SDF_SHARE_PATH \"${CURRENT_PACKAGES_DIR}/share/\"" "")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sdformat-6.2/sdf/sdf_config.h" "#define SDF_VERSION_PATH \"${CURRENT_PACKAGES_DIR}/share/sdformat/\"" "")
# 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)
vcpkg_fixup_pkgconfig()

View File

@ -1,7 +1,7 @@
{
"name": "sdformat6",
"version": "6.2.0",
"port-version": 3,
"port-version": 4,
"description": "Simulation Description Format (SDF) parser and description files.",
"homepage": "http://sdformat.org/",
"supports": "!(arm | uwp)",
@ -10,6 +10,14 @@
"boost-variant",
"ignition-math4",
"tinyxml",
"urdfdom"
"urdfdom",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}

View File

@ -6102,7 +6102,7 @@
},
"sdformat6": {
"baseline": "6.2.0",
"port-version": 3
"port-version": 4
},
"sdformat9": {
"baseline": "9.4.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "dc94f6d1e0351bb777ccd1823470fe22ad896c34",
"version": "6.2.0",
"port-version": 4
},
{
"git-tree": "1273532dcedd66beb82c6ce89024abac0e385761",
"version": "6.2.0",