diff options
Diffstat (limited to 'vcpkg/ports/gz-rendering')
| -rw-r--r-- | vcpkg/ports/gz-rendering/fix-dependencies.patch | 73 | ||||
| -rw-r--r-- | vcpkg/ports/gz-rendering/portfile.cmake | 27 | ||||
| -rw-r--r-- | vcpkg/ports/gz-rendering/vcpkg.json | 26 |
3 files changed, 126 insertions, 0 deletions
diff --git a/vcpkg/ports/gz-rendering/fix-dependencies.patch b/vcpkg/ports/gz-rendering/fix-dependencies.patch new file mode 100644 index 0000000..6bd8e15 --- /dev/null +++ b/vcpkg/ports/gz-rendering/fix-dependencies.patch @@ -0,0 +1,73 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 96ce8913..4ef6b63c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -55,13 +55,13 @@ set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR})
+ if (APPLE)
+ gz_find_package(OpenGL
+ REQUIRED_BY ogre ogre2
+- PKGCONFIG gl)
++ )
+ else()
+ gz_find_package(OpenGL REQUIRED
+ COMPONENTS OpenGL
+ OPTIONAL_COMPONENTS EGL
+ REQUIRED_BY ogre ogre2
+- PKGCONFIG gl)
++ PKGCONFIG opengl)
+ endif()
+
+ if (OpenGL_FOUND)
+@@ -70,6 +70,7 @@ endif()
+
+ #--------------------------------------
+ # Find OGRE
++if(0)
+ list(APPEND gz_ogre_components "RTShaderSystem" "Terrain" "Overlay" "Paging")
+
+ gz_find_package(GzOGRE VERSION 1.9.0
+@@ -87,6 +88,7 @@ if (NOT USE_UNOFFICIAL_OGRE_VERSIONS)
+ "could be reduced to accepting patches for newer versions")
+ endif()
+ endif()
++endif()
+
+ if (OGRE_FOUND)
+ # find boost - mainly needed on macOS and also by the terrain component
+diff --git a/ogre2/src/terrain/Terra/CMakeLists.txt b/ogre2/src/terrain/Terra/CMakeLists.txt
+--- a/ogre2/src/terrain/Terra/CMakeLists.txt
++++ b/ogre2/src/terrain/Terra/CMakeLists.txt
+@@ -1,6 +1,6 @@
+
+-project(terra)
++project(terra9)
+
+ file( GLOB_RECURSE TERRA_SOURCES
+ ${CMAKE_CURRENT_LIST_DIR}/include/*.h
+ ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp
+@@ -32,8 +32,10 @@
+ # we must add this one manually for this to build correctly
+ ${OGRE2_INCLUDE}/Hlms/Pbs
+ ${OGRE2_INCLUDE}/Hlms/Common
+ PUBLIC
+- ${CMAKE_CURRENT_LIST_DIR}/include
++ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
++ $<INSTALL_INTERFACE:include>
+ )
+
+ target_link_libraries(${PROJECT_NAME} PRIVATE GzOGRE2::GzOGRE2)
++install(TARGETS ${PROJECT_NAME} EXPORT gz-rendering9-ogre2)
+diff --git a/ogre2/src/CMakeLists.txt b/ogre2/src/CMakeLists.txt
+--- a/ogre2/src/CMakeLists.txt
++++ b/ogre2/src/CMakeLists.txt
+@@ -58,9 +58,9 @@
+ gz-math${GZ_MATH_VER}::eigen3
+ PRIVATE
+ gz-plugin${GZ_PLUGIN_VER}::register
+ ${OPENGL_LIBRARIES}
+- terra
++ terra9
+ GzOGRE2::GzOGRE2)
+
+
+ if (TARGET OpenGL::EGL)
diff --git a/vcpkg/ports/gz-rendering/portfile.cmake b/vcpkg/ports/gz-rendering/portfile.cmake new file mode 100644 index 0000000..f497d11 --- /dev/null +++ b/vcpkg/ports/gz-rendering/portfile.cmake @@ -0,0 +1,27 @@ +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 0a0f20eadae0c2ac645f44fccc12842cefe01c07211466b1081abaf3a7390730467d0b8c1ecab9451e7e4e1cca30e3bd352a3e79b5c329323d8e70b7815f105a
+ OPTIONS
+ PATCHES
+ fix-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}/bin/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/bin/engine-plugins/")
+ file(REMOVE ${plugins_debug})
+ endif()
+endif()
diff --git a/vcpkg/ports/gz-rendering/vcpkg.json b/vcpkg/ports/gz-rendering/vcpkg.json new file mode 100644 index 0000000..5525d93 --- /dev/null +++ b/vcpkg/ports/gz-rendering/vcpkg.json @@ -0,0 +1,26 @@ +{ + "name": "gz-rendering", + "version": "9.0.0", + "description": "Gazebo Rendering is a C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating 3D graphics applications.", + "homepage": "https://gazebosim.org/libs/rendering", + "license": "Apache-2.0", + "dependencies": [ + "freeimage", + "gz-cmake", + "gz-common", + "gz-math", + "gz-plugin", + "gz-utils", + { + "name": "ignition-modularscripts", + "host": true + }, + { + "name": "ogre-next", + "features": [ + "planar-reflections" + ] + }, + "opengl" + ] +} |