aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/gz-physics
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/gz-physics')
-rw-r--r--vcpkg/ports/gz-physics/dependencies.patch20
-rw-r--r--vcpkg/ports/gz-physics/portfile.cmake26
-rw-r--r--vcpkg/ports/gz-physics/vcpkg.json31
3 files changed, 77 insertions, 0 deletions
diff --git a/vcpkg/ports/gz-physics/dependencies.patch b/vcpkg/ports/gz-physics/dependencies.patch
new file mode 100644
index 0000000..2ae4a81
--- /dev/null
+++ b/vcpkg/ports/gz-physics/dependencies.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b16b4dd..3c44e8d 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -85,10 +85,14 @@ gz_find_package(DART
+
+ #--------------------------------------
+ # Find bullet for the bullet plugin wrapper
++set(bullet_pkgconfig PKGCONFIG bullet)
++if(WIN32)
++ set(bullet_pkgconfig PKGCONFIG_IGNORE)
++endif()
+ gz_find_package(GzBullet
+ VERSION 2.87
+ REQUIRED_BY bullet bullet-featherstone
+- PKGCONFIG bullet
++ ${bullet_pkgconfig}
+ PKGCONFIG_VER_COMPARISON >=)
+
+ message(STATUS "-------------------------------------------\n")
diff --git a/vcpkg/ports/gz-physics/portfile.cmake b/vcpkg/ports/gz-physics/portfile.cmake
new file mode 100644
index 0000000..65842a8
--- /dev/null
+++ b/vcpkg/ports/gz-physics/portfile.cmake
@@ -0,0 +1,26 @@
+string(REGEX MATCH "^[0-9]+" VERSION_MAJOR ${VERSION})
+string(REGEX MATCH "^gz-([a-z-]+)" MATCHED_VALUE ${PORT})
+set(PACKAGE_NAME ${CMAKE_MATCH_1})
+
+ignition_modular_library(
+ NAME ${PACKAGE_NAME}
+ REF ${PORT}${VERSION_MAJOR}_${VERSION}
+ VERSION ${VERSION}
+ SHA512 8f62af3838e9189c3a93fea87991c390ddd4fa0d5c0ecb80f8347bfb2f5892ec73c4bca1ac05d083d2a5adcbbd698e76215d56498bd648834a46af7784e8ce57
+ PATCHES
+ dependencies.patch
+)
+
+if(VCPKG_TARGET_IS_WINDOWS)
+ file(GLOB plugins "${CURRENT_PACKAGES_DIR}/lib/${PORT}-${VERSION_MAJOR}/engine-plugins/*.dll")
+ if (NOT plugins STREQUAL "")
+ file(COPY ${plugins} DESTINATION "${CURRENT_PACKAGES_DIR}/engine-plugins/")
+ file(REMOVE ${plugins})
+ endif()
+
+ file(GLOB plugins_debug "${CURRENT_PACKAGES_DIR}/debug/lib/${PORT}-${VERSION_MAJOR}/engine-plugins/*.dll")
+ if (NOT plugins_debug STREQUAL "")
+ file(COPY ${plugins_debug} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/engine-plugins/")
+ file(REMOVE ${plugins_debug})
+ endif()
+endif()
diff --git a/vcpkg/ports/gz-physics/vcpkg.json b/vcpkg/ports/gz-physics/vcpkg.json
new file mode 100644
index 0000000..44f4174
--- /dev/null
+++ b/vcpkg/ports/gz-physics/vcpkg.json
@@ -0,0 +1,31 @@
+{
+ "name": "gz-physics",
+ "version": "8.0.0",
+ "port-version": 2,
+ "description": "component of Gazebo, provides an abstract physics interface designed to support simulation and rapid development of robot applications.",
+ "homepage": "https://gazebosim.org/libs/physics",
+ "license": "Apache-2.0",
+ "dependencies": [
+ "bullet3",
+ {
+ "name": "dartsim",
+ "features": [
+ "collision-bullet",
+ "collision-ode",
+ "utils",
+ "utils-urdf"
+ ]
+ },
+ "eigen3",
+ "gz-cmake",
+ "gz-common",
+ "gz-math",
+ "gz-plugin",
+ "gz-utils",
+ {
+ "name": "ignition-modularscripts",
+ "host": true
+ },
+ "sdformat"
+ ]
+}