[gz-sim] Add gz-sim port (#44275)

This commit is contained in:
talregev 2025-04-08 22:58:57 +03:00 committed by GitHub
parent 82e19a98ae
commit c40910f49d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 117 additions and 3 deletions

View File

@ -29,6 +29,4 @@ if(VCPKG_TARGET_IS_WINDOWS)
file(REMOVE ${plugins_debug})
endif()
# Lacking pc files for Qt
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
endif()

View File

@ -1,6 +1,7 @@
{
"name": "gz-gui",
"version": "9.0.0",
"port-version": 1,
"description": "Gazebo GUI builds on top of Qt to provide widgets which are useful when developing robotics applications, such as a 3D view, plots, dashboard, etc, and can be used together in a convenient unified interface.",
"homepage": "https://gazebosim.org/libs/gui",
"license": "Apache-2.0",

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,8 +23,16 @@
#============================================================================
# Set project-specific options
#============================================================================
+if(WIN32)
+ set(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
+endif()
+
+if(UNIX AND NOT APPLE)
+ set(CMAKE_CXX_FLAGS "-Wl,-Bsymbolic ${CMAKE_CXX_FLAGS}")
+endif()
+
option(ENABLE_PROFILER "Enable Gazebo Profiler" FALSE)
if(ENABLE_PROFILER)
add_definitions("-DGZ_PROFILER_ENABLE=1")

View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f309499c..943f60d98 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -121,7 +121,7 @@ gz_find_package (Qt5
Quick
QuickControls2
REQUIRED
- PKGCONFIG "Qt5Core Qt5Quick Qt5QuickControls2")
+)
#--------------------------------------
# Find gz-physics

View File

@ -0,0 +1,38 @@
string(REGEX MATCH "^[0-9]+" VERSION_MAJOR ${VERSION})
set(PACKAGE_NAME gazebo)
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}${VERSION_MAJOR}_${VERSION}
VERSION ${VERSION}
SHA512 4ac9debe27a41233c7c2116bd80f277ebe74f4ae639f06555cec4209bb7af6fe741197705fac222b4e00c8493daaf701b1eefee4ff639fdea70703bed80e0f8a
OPTIONS
-DSKIP_PYBIND11=ON
"-DPython3_EXECUTABLE=${PYTHON3}"
PATCHES
dependencies.patch
cxx_flags.patch
)
IF(EXISTS "${CURRENT_PACKAGES_DIR}/lib/${PORT}-${VERSION_MAJOR}/")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/plugins")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/${PORT}-${VERSION_MAJOR}/" "${CURRENT_PACKAGES_DIR}/plugins/${PORT}-${VERSION_MAJOR}/")
endif()
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}-${VERSION_MAJOR}/")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/plugins")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}-${VERSION_MAJOR}/" "${CURRENT_PACKAGES_DIR}/debug/plugins/${PORT}-${VERSION_MAJOR}/")
endif()
if(VCPKG_TARGET_IS_WINDOWS)
file(GLOB BIN_DLLS "${CURRENT_PACKAGES_DIR}/lib/${PORT}${VERSION_MAJOR}-*.dll")
file(GLOB BIN_DEBUG_DLLS "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}${VERSION_MAJOR}-*.dll")
file(COPY ${BIN_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin/")
file(COPY ${BIN_DEBUG_DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin/")
file(REMOVE_RECURSE ${BIN_DLLS} ${BIN_DEBUG_DLLS})
endif()

26
ports/gz-sim/vcpkg.json Normal file
View File

@ -0,0 +1,26 @@
{
"name": "gz-sim",
"version": "9.0.0",
"description": "Gazebo Sim is an open source robotics simulator.",
"homepage": "https://gazebosim.org/libs/sim",
"license": "Apache-2.0",
"dependencies": [
"gz-cmake",
"gz-common",
"gz-fuel-tools",
"gz-gui",
"gz-math",
"gz-msgs",
"gz-physics",
"gz-plugin",
"gz-rendering",
"gz-sensors",
"gz-transport",
"gz-utils",
{
"name": "ignition-modularscripts",
"host": true
},
"sdformat"
]
}

View File

@ -3446,7 +3446,7 @@
},
"gz-gui": {
"baseline": "9.0.0",
"port-version": 0
"port-version": 1
},
"gz-gui7": {
"baseline": "7.2.1",
@ -3500,6 +3500,10 @@
"baseline": "7.3.0",
"port-version": 1
},
"gz-sim": {
"baseline": "9.0.0",
"port-version": 0
},
"gz-tools": {
"baseline": "2.0.1",
"port-version": 0

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ff1310cb6e15487d525ff301ccafad1af6a66c46",
"version": "9.0.0",
"port-version": 1
},
{
"git-tree": "41832e3622c06b574473bf4d9355d2fd3429205c",
"version": "9.0.0",

9
versions/g-/gz-sim.json Normal file
View File

@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "f4e987fd959e697589da3a4ecc77a1f805001dc4",
"version": "9.0.0",
"port-version": 0
}
]
}