forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[urdfdom][sdformat9] Re-fix build (microsoft#22367)
* [urdfdom][sdformat9] Re-fix build * version * Remove empty folder * version * [dartsim] Fix build issue * version * Update version name * version * Apply suggestions * version * Add PKG_EXPORTS * version * Update ports/sdformat9/fix-dependency-urdfdom.patch Co-authored-by: nicole mazzuca <[email protected]>
- Loading branch information
1 parent
6d27dc9
commit d4acfe7
Showing
13 changed files
with
174 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index f0d115d..9acbfbe 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -58,17 +58,18 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}" | ||
|
||
enable_testing() | ||
|
||
-add_subdirectory(urdf_parser) | ||
- | ||
if(WIN32 AND NOT CYGWIN) | ||
set(CMAKE_CONFIG_INSTALL_DIR CMake) | ||
else() | ||
set(CMAKE_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_FULL_LIBDIR}/${PROJECT_NAME}/cmake/) | ||
endif() | ||
|
||
+add_subdirectory(urdf_parser) | ||
+ | ||
set(PKG_NAME ${PROJECT_NAME}) | ||
set(PKG_LIBRARIES urdfdom_sensor urdfdom_model_state urdfdom_model urdfdom_world) | ||
set(PKG_DEPENDS urdfdom_headers console_bridge) | ||
+set(PKG_EXPORTS urdfdom) | ||
set(cmake_conf_file "cmake/urdfdom-config.cmake") | ||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${cmake_conf_file}.in" "${CMAKE_BINARY_DIR}/${cmake_conf_file}" @ONLY) | ||
install(FILES ${CMAKE_BINARY_DIR}/${cmake_conf_file} | ||
diff --git a/cmake/urdfdom-config.cmake.in b/cmake/urdfdom-config.cmake.in | ||
index fb81b47..8b4ef8f 100644 | ||
--- a/cmake/urdfdom-config.cmake.in | ||
+++ b/cmake/urdfdom-config.cmake.in | ||
@@ -3,8 +3,12 @@ if (@PKG_NAME@_CONFIG_INCLUDED) | ||
endif() | ||
set(@PKG_NAME@_CONFIG_INCLUDED TRUE) | ||
|
||
-set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include" "@TinyXML_INCLUDE_DIRS@") | ||
+get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) | ||
+get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) | ||
|
||
+set(@PKG_NAME@_INCLUDE_DIRS "${_IMPORT_PREFIX}/include" "@TinyXML_INCLUDE_DIRS@") | ||
+ | ||
+if (0) | ||
foreach(lib @PKG_LIBRARIES@) | ||
set(onelib "${lib}-NOTFOUND") | ||
find_library(onelib ${lib} | ||
@@ -25,3 +29,13 @@ foreach(dep @PKG_DEPENDS@) | ||
list(APPEND @PKG_NAME@_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS}) | ||
list(APPEND @PKG_NAME@_LIBRARIES ${${dep}_LIBRARIES}) | ||
endforeach() | ||
+endif() | ||
+ | ||
+include(CMakeFindDependencyMacro) | ||
+find_dependency(console_bridge) | ||
+ | ||
+foreach(exp @PKG_EXPORTS@) | ||
+ include(${@PROJECT_NAME@_DIR}/${exp}Export.cmake) | ||
+endforeach() | ||
+ | ||
+set(@PKG_NAME@_LIBRARIES urdfdom::urdfdom_model urdfdom::urdfdom_world urdfdom::urdfdom_sensor urdfdom::urdfdom_model_state) | ||
\ No newline at end of file | ||
diff --git a/urdf_parser/CMakeLists.txt b/urdf_parser/CMakeLists.txt | ||
index 731b57a..ebd0586 100644 | ||
--- a/urdf_parser/CMakeLists.txt | ||
+++ b/urdf_parser/CMakeLists.txt | ||
@@ -39,10 +39,32 @@ if(BUILD_TESTING) | ||
add_subdirectory(test) | ||
endif() | ||
|
||
-INSTALL(TARGETS urdfdom_model DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
-INSTALL(TARGETS urdfdom_world DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
-INSTALL(TARGETS check_urdf urdf_to_graphiz urdf_mem_test | ||
- DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
-INSTALL(TARGETS urdfdom_sensor DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
-INSTALL(TARGETS urdfdom_model_state DESTINATION ${CMAKE_INSTALL_LIBDIR}) | ||
+INSTALL( | ||
+ TARGETS | ||
+ check_urdf | ||
+ urdf_to_graphiz | ||
+ urdf_mem_test | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+) | ||
+INSTALL( | ||
+ TARGETS | ||
+ urdfdom_model | ||
+ urdfdom_world | ||
+ urdfdom_sensor | ||
+ urdfdom_model_state | ||
+ EXPORT | ||
+ urdfdom | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+) | ||
+install( | ||
+ EXPORT urdfdom | ||
+ DESTINATION ${CMAKE_CONFIG_INSTALL_DIR} | ||
+ NAMESPACE "${PROJECT_NAME}::" | ||
+ FILE "urdfdomExport.cmake" | ||
+) | ||
+ | ||
INSTALL(DIRECTORY include/urdf_parser DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
{ | ||
"name": "urdfdom", | ||
"version-string": "1.0.4", | ||
"port-version": 4, | ||
"version": "1.0.4", | ||
"port-version": 5, | ||
"description": "Provides core data structures and a simple XML parsers for populating the class data structures from an URDF file.", | ||
"homepage": "https://github.com/ros/urdfdom", | ||
"dependencies": [ | ||
"console-bridge", | ||
"tinyxml", | ||
"urdfdom-headers" | ||
"urdfdom-headers", | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters