mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 19:30:15 +08:00
[vcpkg baseline][sdformat13] Fix find dependency urdfdom (#33433)
* [sdformat13] Fix find dependency urdfdom * version * fix usage * version * Update ports/sdformat13/portfile.cmake * version --------- Co-authored-by: jyu49 <yu_jack@apple.com>
This commit is contained in:
parent
b49a27d25d
commit
cdf9d9b5d5
24
ports/sdformat13/fix-find-urdfdom.patch
Normal file
24
ports/sdformat13/fix-find-urdfdom.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index e797e8a..0f652d7 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -56,7 +56,18 @@ if (BUILD_SDF)
|
||||||
|
# 2. if USE_INTERNAL_URDF is set to True, use the internal copy
|
||||||
|
# 3. if USE_INTERNAL_URDF is set to False, force to search system installation, fail on error
|
||||||
|
if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF)
|
||||||
|
- gz_find_package(GzURDFDOM)
|
||||||
|
+ find_package(urdfdom CONFIG REQUIRED)
|
||||||
|
+ add_library(GzURDFDOM::GzURDFDOM INTERFACE IMPORTED)
|
||||||
|
+ target_link_libraries(GzURDFDOM::GzURDFDOM
|
||||||
|
+ INTERFACE
|
||||||
|
+ urdfdom::urdfdom_model
|
||||||
|
+ urdfdom::urdfdom_world
|
||||||
|
+ urdfdom::urdfdom_sensor
|
||||||
|
+ urdfdom::urdfdom_model_state
|
||||||
|
+ )
|
||||||
|
+ include(FindPackageHandleStandardArgs)
|
||||||
|
+ find_package_handle_standard_args(GzURDFDOM DEFAULT_MSG)
|
||||||
|
+
|
||||||
|
if (NOT GzURDFDOM_FOUND)
|
||||||
|
if (NOT DEFINED USE_INTERNAL_URDF)
|
||||||
|
# fallback to internal urdf
|
@ -7,6 +7,7 @@ vcpkg_from_github(
|
|||||||
PATCHES
|
PATCHES
|
||||||
no-absolute.patch
|
no-absolute.patch
|
||||||
cmake-config.patch
|
cmake-config.patch
|
||||||
|
fix-find-urdfdom.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ruby is required by the sdformat build process
|
# Ruby is required by the sdformat build process
|
||||||
@ -20,7 +21,6 @@ vcpkg_cmake_configure(
|
|||||||
-DSKIP_PYBIND11=ON
|
-DSKIP_PYBIND11=ON
|
||||||
-DUSE_INTERNAL_URDF=OFF
|
-DUSE_INTERNAL_URDF=OFF
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
|
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
|
||||||
-DCMAKE_REQUIRE_FIND_PACKAGE_GzURDFDOM=ON
|
|
||||||
-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON
|
-DCMAKE_DISABLE_FIND_PACKAGE_Python3=ON
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -28,6 +28,21 @@ vcpkg_cmake_install()
|
|||||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sdformat13")
|
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/sdformat13")
|
||||||
vcpkg_fixup_pkgconfig()
|
vcpkg_fixup_pkgconfig()
|
||||||
|
|
||||||
|
# fix dependency urdfdom
|
||||||
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/sdformat13-config.cmake" "find_package(TINYXML2" [[
|
||||||
|
if (NOT TARGET GzURDFDOM::GzURDFDOM)
|
||||||
|
find_package(urdfdom CONFIG ${gz_package_quiet} ${gz_package_required})
|
||||||
|
add_library(GzURDFDOM::GzURDFDOM INTERFACE IMPORTED)
|
||||||
|
target_link_libraries(GzURDFDOM::GzURDFDOM
|
||||||
|
INTERFACE
|
||||||
|
urdfdom::urdfdom_model
|
||||||
|
urdfdom::urdfdom_world
|
||||||
|
urdfdom::urdfdom_sensor
|
||||||
|
urdfdom::urdfdom_model_state
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
find_package(TINYXML2]])
|
||||||
|
|
||||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include"
|
||||||
"${CURRENT_PACKAGES_DIR}/debug/share")
|
"${CURRENT_PACKAGES_DIR}/debug/share")
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "sdformat13",
|
"name": "sdformat13",
|
||||||
"version": "13.5.0",
|
"version": "13.5.0",
|
||||||
|
"port-version": 1,
|
||||||
"description": "Simulation Description Format (SDF) parser and description files.",
|
"description": "Simulation Description Format (SDF) parser and description files.",
|
||||||
"homepage": "http://sdformat.org/",
|
"homepage": "http://sdformat.org/",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -7446,7 +7446,7 @@
|
|||||||
},
|
},
|
||||||
"sdformat13": {
|
"sdformat13": {
|
||||||
"baseline": "13.5.0",
|
"baseline": "13.5.0",
|
||||||
"port-version": 0
|
"port-version": 1
|
||||||
},
|
},
|
||||||
"sdformat6": {
|
"sdformat6": {
|
||||||
"baseline": "6.2.0",
|
"baseline": "6.2.0",
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versions": [
|
"versions": [
|
||||||
|
{
|
||||||
|
"git-tree": "88424090fdd3b2122094e75be5c68b3f2f58cda5",
|
||||||
|
"version": "13.5.0",
|
||||||
|
"port-version": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"git-tree": "b8f7d3bdbefa0795808f6c9a42764584d6e96f2c",
|
"git-tree": "b8f7d3bdbefa0795808f6c9a42764584d6e96f2c",
|
||||||
"version": "13.5.0",
|
"version": "13.5.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user