Skip to content

Commit

Permalink
Add more gz ports (#33389)
Browse files Browse the repository at this point in the history
  • Loading branch information
talregev authored and pull[bot] committed Oct 24, 2024
1 parent 977307d commit 2108641
Show file tree
Hide file tree
Showing 22 changed files with 418 additions and 0 deletions.
89 changes: 89 additions & 0 deletions ports/gz-common5/fix_dependencies.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73920fe..8bee7fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@ set(IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
#--------------------------------------
# Find Tinyxml2
if(USE_EXTERNAL_TINYXML2)
- gz_find_package(TINYXML2 PRETTY tinyxml2
+ gz_find_package(tinyxml2 EXTRA_ARGS CONFIG
REQUIRED_BY graphics
PRIVATE_FOR graphics)
else()
@@ -70,13 +70,13 @@ if(NOT MSVC)

#------------------------------------
# Find uuid
- gz_find_package(UUID REQUIRED PRETTY uuid)
+ gz_find_package(UUID REQUIRED PRETTY uuid REQUIRED_BY graphics)

endif()

#------------------------------------
# Find Freeimage
-gz_find_package(FreeImage VERSION 3.9
+gz_find_package(freeimage EXTRA_ARGS CONFIG
REQUIRED_BY graphics
PRIVATE_FOR graphics)

@@ -84,6 +84,7 @@ ign_find_package(FreeImage VERSION 3.9
# Find GNU Triangulation Surface Library
gz_find_package(
GTS PRETTY gts PURPOSE "GNU Triangulation Surface library"
+ BY_PKGCONFIG gts
REQUIRED_BY graphics
PRIVATE_FOR graphics)

@@ -98,7 +98,7 @@
#------------------------------------
# Find GDAL
-gz_find_package(GDAL VERSION 3.0
+gz_find_package(GDAL
PKGCONFIG gdal
PRIVATE_FOR geospatial
REQUIRED_BY geospatial)

diff --git a/graphics/src/CMakeLists.txt b/graphics/src/CMakeLists.txt
index 000a0ce..f6e1831 100644
--- a/graphics/src/CMakeLists.txt
+++ b/graphics/src/CMakeLists.txt
@@ -14,8 +14,10 @@ target_link_libraries(${graphics_target}
PUBLIC
gz-math${GZ_MATH_VER}::gz-math${GZ_MATH_VER}
gz-utils${GZ_UTILS_VER}::gz-utils${GZ_UTILS_VER}
PRIVATE
${GzAssimp_LIBRARIES}
GTS::GTS
- FreeImage::FreeImage)
+ freeimage::FreeImage)
+
+target_include_directories(${graphics_target} PRIVATE ${GTS_INCLUDE_DIRS})

@@ -42,14 +44,14 @@ if(USE_EXTERNAL_TINYXML2)

# If we are using an external copy of tinyxml2, add its imported target
target_link_libraries(${graphics_target}
PRIVATE
- TINYXML2::TINYXML2)
+ tinyxml2::tinyxml2)

# The collada exporter test uses tinyxml2, so we must link it if we're using
# an external copy. The graphics target considers tinyxml2 to be a private
# dependency, so it will not automatically get linked to this test.
if(TARGET UNIT_ColladaExporter_TEST)
- target_link_libraries(UNIT_ColladaExporter_TEST TINYXML2::TINYXML2)
+ target_link_libraries(UNIT_ColladaExporter_TEST tinyxml2::tinyxml2)
endif()

else()
@@ -79,7 +81,7 @@
# define of tinxml2 major version >= 6
# https://github.com/gazebosim/gz-common/issues/28
-if (NOT TINYXML2_VERSION VERSION_LESS "6.0.0")
- message(STATUS "TINYXML2_VERSION ${TINYXML2_VERSION} >= 6.0.0")
+if (NOT tinyxml2_VERSION VERSION_LESS "6.0.0")
+ message(STATUS "TINYXML2_VERSION ${tinyxml2_VERSION} >= 6.0.0")
target_compile_definitions(${graphics_target}
PRIVATE "TINYXML2_MAJOR_VERSION_GE_6")
endif()
12 changes: 12 additions & 0 deletions ports/gz-common5/gz_remotery_vis.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/profiler/src/CMakeLists.txt b/profiler/src/CMakeLists.txt
--- a/profiler/src/CMakeLists.txt
+++ b/profiler/src/CMakeLists.txt
@@ -116,7 +116,7 @@
install(PROGRAMS
${CMAKE_CURRENT_BINARY_DIR}/gz_remotery_vis
- DESTINATION ${GZ_PROFILER_SCRIPT_PATH})
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/tools/gz-common${PROJECT_VERSION_MAJOR})

install(DIRECTORY Remotery/vis/
DESTINATION ${GZ_PROFILER_VIS_PATH})
endif()
14 changes: 14 additions & 0 deletions ports/gz-common5/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
set(PACKAGE_NAME common)

ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 40db4747db743005d7c43ca25cfe93cf68ee19201abcb165e72de37708b92fd88553b11520c420db33b37f4cab7e01e4d79c91c5dc0485146b7156284b8baaee
OPTIONS
-DUSE_EXTERNAL_TINYXML2=ON
PATCHES
fix_dependencies.patch
remove_tests.patch
gz_remotery_vis.patch
)
15 changes: 15 additions & 0 deletions ports/gz-common5/remove_tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,4 +41,5 @@
+if(0)
# Build the unit tests
gz_build_tests(
TYPE UNIT
SOURCES ${gtest_sources}
@@ -77,4 +78,5 @@
message(STATUS "")
target_compile_definitions(UNIT_Filesystem_TEST PRIVATE GZ_BUILD_SYMLINK_TESTS_ON_WINDOWS)
endif()
endif()
+endif(0)
29 changes: 29 additions & 0 deletions ports/gz-common5/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "gz-common5",
"version": "5.4.1",
"description": "Common libraries for robotics applications",
"homepage": "https://ignitionrobotics.org/libs/common",
"license": "Apache-2.0",
"dependencies": [
"assimp",
{
"name": "dlfcn-win32",
"platform": "windows | uwp"
},
"ffmpeg",
"freeimage",
"gdal",
"gts",
"gz-cmake3",
"gz-math7",
{
"name": "ignition-modularscripts",
"host": true
},
{
"name": "libuuid",
"platform": "!windows & !uwp & !osx"
},
"tinyxml2"
]
}
11 changes: 11 additions & 0 deletions ports/gz-fuel-tools8/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(PACKAGE_NAME fuel-tools)

ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 6a31719441c7ea835007d82b6aea99b10fa124ebad71683b8c1c58c41b435d4801e016464dc30d760cc9464e642dab4ff910375f5244ebf7c565845174e65cbf
OPTIONS
PATCHES
remove_docs.patch
)
22 changes: 22 additions & 0 deletions ports/gz-fuel-tools8/remove_docs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -79,6 +79,8 @@

+if(0)
#============================================================================
# gz command line support
#============================================================================
add_subdirectory(conf)
+endif(0)

@@ -95,7 +95,9 @@

+if(0)
gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md"
TAGFILES
"${GZ-COMMON_DOXYGEN_TAGFILE} = ${GZ-COMMON_API_URL}"
)
+endif(0)
21 changes: 21 additions & 0 deletions ports/gz-fuel-tools8/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "gz-fuel-tools8",
"version": "8.1.0",
"description": "Tools for using fuel API to download robot models",
"homepage": "https://gazebosim.org/libs/fuel_tools",
"license": null,
"dependencies": [
"curl",
"gz-cmake3",
"gz-common5",
"gz-msgs9",
{
"name": "ignition-modularscripts",
"host": true
},
"jsoncpp",
"libyaml",
"libzip",
"tinyxml2"
]
}
15 changes: 15 additions & 0 deletions ports/gz-msgs9/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set(PACKAGE_NAME msgs)

vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 669e60fc35868e4d86695104a58aecaef9ad08861cba97ff91c7306caf66ec237da46c0a13f5f59907371fc7a4dd56d5506fabe4ba97c393889fc5a9c2a101ee
OPTIONS
PATCHES
remove_ruby.patch
)
17 changes: 17 additions & 0 deletions ports/gz-msgs9/remove_ruby.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -102,5 +102,5 @@
- if(gz_msgs_protoc_GENERATE_RUBY)
+ if(0)
file(MAKE_DIRECTORY ${gz_msgs_protoc_OUTPUT_RUBY_DIR})
set(output_ruby "${gz_msgs_protoc_OUTPUT_RUBY_DIR}${proto_package_dir}/${FIL_WE}_pb.rb")
list(APPEND ${gz_msgs_protoc_OUTPUT_RUBY_VAR} ${output_ruby})
list(APPEND output_files ${output_ruby})
@@ -126,5 +126,5 @@
- if(${gz_msgs_protoc_GENERATE_RUBY})
+ if(0)
list(APPEND GENERATE_ARGS
--generate-ruby
--output-ruby-path "${gz_msgs_protoc_OUTPUT_RUBY_DIR}")
endif()
17 changes: 17 additions & 0 deletions ports/gz-msgs9/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "gz-msgs9",
"version": "9.5.0",
"description": "Middleware protobuf messages for robotics",
"license": "Apache-2.0",
"supports": "!(android | arm | uwp)",
"dependencies": [
"gz-cmake3",
"gz-math7",
{
"name": "ignition-modularscripts",
"host": true
},
"protobuf",
"tinyxml2"
]
}
10 changes: 10 additions & 0 deletions ports/gz-plugin2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
set(PACKAGE_NAME plugin)

ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 4c497291f8e33aae3a5752607a7fd7b48912e209f0f424ea7b1e6d35f27d1e920d1dd97ee64b7b3846d7d433618742be5d19352cbce8f6f63eccc83a086520ea
OPTIONS
PATCHES
)
20 changes: 20 additions & 0 deletions ports/gz-plugin2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "gz-plugin2",
"version": "2.0.1",
"description": "Library for registering plugin libraries and dynamically loading them at runtime",
"homepage": "https://ignitionrobotics.org/libs/plugin",
"license": null,
"supports": "!arm & !android",
"dependencies": [
{
"name": "dlfcn-win32",
"platform": "windows | uwp"
},
"gz-cmake3",
"gz-utils2",
{
"name": "ignition-modularscripts",
"host": true
}
]
}
11 changes: 11 additions & 0 deletions ports/gz-transport12/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(PACKAGE_NAME transport)

ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 8f0c02b76579679d40b16bd19796e8ac84eaace6c70889fc703d4c234970be130ca1dd18f047c0b40acd46e8f9291f199b8558329a75a33fc61c235dfcb79f4d
OPTIONS
PATCHES
uuid-osx.patch
)
28 changes: 28 additions & 0 deletions ports/gz-transport12/uuid-osx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,8 +72,10 @@
#--------------------------------------
# Find uuid
if (MSVC)
message (STATUS "UUID: Using Windows RPC UuidCreate function\n")
+elseif (APPLE)
+ message (STATUS "Use system uuid header")
else()
gz_find_package(UUID REQUIRED)
endif()

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,9 +20,9 @@
$<TARGET_PROPERTY:protobuf::libprotobuf,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:CPPZMQ::CPPZMQ,INTERFACE_INCLUDE_DIRECTORIES>)

# Windows system library provides UUID
-if (NOT MSVC)
+if (NOT MSVC AND NOT APPLE)
target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
PUBLIC
UUID::UUID
)
22 changes: 22 additions & 0 deletions ports/gz-transport12/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "gz-transport12",
"version": "12.2.0",
"description": "Transport middleware for robotics",
"license": null,
"dependencies": [
"cppzmq",
"gz-cmake3",
"gz-msgs9",
{
"name": "ignition-modularscripts",
"host": true
},
{
"name": "libuuid",
"platform": "!windows & !uwp & !osx"
},
"protobuf",
"sqlite3",
"zeromq"
]
}
Loading

0 comments on commit 2108641

Please sign in to comment.