upgrade ogre-next 2.3.3 and fix osx (#34945)

This commit is contained in:
talregev 2023-12-05 22:23:44 +02:00 committed by GitHub
parent b051c80d93
commit 08c4e71048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 76 additions and 52 deletions

View File

@ -117,7 +117,7 @@ diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake
find_package(PkgConfig QUIET)
-if (PkgConfig_FOUND)
+if (NOT WIN32)
+if (UNIX AND NOT APPLE)
set(PKG_CONFIG_PATH_ORIGINAL $ENV{PKG_CONFIG_PATH})
- foreach (GZ_OGRE2_PROJECT_NAME "OGRE2" "OGRE-Next")
+ foreach (GZ_OGRE2_PROJECT_NAME "OGRE-Next")
@ -146,7 +146,7 @@ diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake
if (NOT "${OGRE2-${component}}" STREQUAL "OGRE2-${component}-NOTFOUND")
message(STATUS " + component ${component}: found")
# create a new target for each component
@@ -403,15 +406,24 @@
@@ -403,15 +406,23 @@
set(OGRE2_SEARCH_VER "OGRE-${GzOGRE2_FIND_VERSION_MAJOR}.${GzOGRE2_FIND_VERSION_MINOR}")
set(OGRE2_PATHS "")
set(OGRE2_INC_PATHS "")
@ -162,20 +162,19 @@ diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake
+ list(APPEND OGRE2_INC_PATHS "${_rootPath}/include/OGRE-Next")
endforeach()
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ set(OGRE_MAIN_LIB "OgreNextMain_d")
+ else()
+ set(OGRE_MAIN_LIB "OgreNextMain")
+ endif()
+
find_library(OGRE2_LIBRARY
- NAMES "OgreMain"
+ NAMES "${OGRE_MAIN_LIB}"
+ NAMES
+ "OgreNextMain"
+ "OgreNextMainStatic"
+ "OgreNextMain_d"
+ "OgreNextMainStatic_d"
+ NAMES_PER_DIR
HINTS ${OGRE2_PATHS}
NO_DEFAULT_PATH)
find_path(OGRE2_INCLUDE
@@ -449,10 +461,10 @@
@@ -449,10 +460,13 @@
${PATH_HINTS} ${COMPONENT} ${OGRE2_SEARCH_VER}/${COMPONENT})
find_library(${PREFIX}_LIBRARY
@ -184,11 +183,14 @@ diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake
- "Ogre${COMPONENT}_d"
+ "OgreNext${COMPONENT}"
+ "OgreNext${COMPONENT}_d"
+ "OgreNext${COMPONENT}Static"
+ "OgreNext${COMPONENT}Static_d"
+ NAMES_PER_DIR
HINTS
${OGRE2_LIBRARY_DIRS}
NO_DEFAULT_PATH)
@@ -509,8 +521,9 @@
@@ -509,8 +522,9 @@
ogre_find_plugin(Plugin_ParticleFX OgreParticleFXPrerequisites.h PlugIns/ParticleFX/include)
ogre_find_plugin(RenderSystem_GL3Plus OgreGL3PlusRenderSystem.h RenderSystems/GL3Plus/include)
@ -198,7 +200,7 @@ diff --git a/cmake/FindGzOGRE2.cmake b/cmake/FindGzOGRE2.cmake
foreach(component ${GzOGRE2_FIND_COMPONENTS})
set(PREFIX OGRE2_${component})
if(${PREFIX}_FOUND)
@@ -520,9 +533,9 @@
@@ -520,9 +534,9 @@
string(FIND ${component} "Hlms" HLMS_POS)
if(${HLMS_POS} GREATER -1)
foreach (dir ${OGRE2_INCLUDE_DIRS})

View File

@ -1,7 +1,7 @@
{
"name": "gz-cmake3",
"version": "3.4.1",
"port-version": 4,
"port-version": 5,
"description": "CMake helper functions for building robotic applications",
"homepage": "https://ignitionrobotics.org/libs/cmake",
"license": null,

View File

@ -7,7 +7,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
gz_find_package(OpenGL
REQUIRED_BY ogre ogre2
- PKGCONFIG gl)
+ PKGCONFIG opengl)
+ )
else()
gz_find_package(OpenGL REQUIRED
COMPONENTS OpenGL

View File

@ -1,6 +1,7 @@
{
"name": "gz-rendering7",
"version": "7.4.1",
"port-version": 1,
"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",

View File

@ -1,21 +0,0 @@
diff --git a/CMake/Templates/OGREStatic.pc.in b/CMake/Templates/OGREStatic.pc.in
--- a/CMake/Templates/OGREStatic.pc.in
+++ b/CMake/Templates/OGREStatic.pc.in
@@ -1,13 +1,13 @@
prefix=@OGRE_PREFIX_PATH@
exec_prefix=${prefix}
libdir=${prefix}/@OGRE_LIB_DIRECTORY@
includedir=${prefix}/include
-plugindir=${libdir}/OGRE
+plugindir=${libdir}/@OGRE_NEXT_PREFIX@
-Name: OGRE (static lib)
+Name: @OGRE_NEXT_PREFIX@ (static lib)
Description: Object-Oriented Graphics Rendering Engine
Version: @OGRE_VERSION@
URL: http://www.ogre3d.org
Requires: freetype2, zziplib, x11, xt, xaw7, gl
-Libs: -L${libdir} -L${plugindir} -lOgreMain@OGRE_LIB_SUFFIX@ @OGRE_ADDITIONAL_LIBS@
-Cflags: -I${includedir} -I${includedir}/OGRE @OGRE_CFLAGS@
+Libs: -L${libdir} -L${plugindir} -l@OGRE_NEXT@Main@OGRE_LIB_SUFFIX@ @OGRE_ADDITIONAL_LIBS@
+Cflags: -I${includedir} -I${includedir}/@OGRE_NEXT_PREFIX@ @OGRE_CFLAGS@

13
ports/ogre-next/osx.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,3 +29,3 @@
endif()
-
+set(CMAKE_CXX_STANDARD 17)
# Use relative paths
@@ -387,3 +387,3 @@
else()
- set(CMAKE_OSX_SYSROOT macosx)
+ # set(CMAKE_OSX_SYSROOT macosx)
endif()

View File

@ -6,14 +6,14 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OGRECave/ogre-next
REF v${VERSION}
SHA512 fbc1969244db07d013118fbce12b319e83cdae93a822cb2d90bbd12108ac3ce48d1f5437b4375b3daf5640b9ec6f1764daeef742161a101f77c3e25ccaf4b154
SHA512 52ed2d2a3375c0d35f0dc695b986514484ad1d47966c5c18351d3b09913123b2487b9729738c6b8b1219c1a992a8c8509a2303e097a6eb26497e152a14d48830
HEAD_REF master
PATCHES
toolchain_fixes.patch
avoid-name-clashes.patch
fix-error-c2039.patch
fix-dependencies.patch
fix-pc-file.patch
osx.patch
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
@ -32,6 +32,7 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF
-DOGRE_COPY_DEPENDENCIES=OFF
-DOGRE_BUILD_SAMPLES2=OFF
-DOGRE_BUILD_TESTS=OFF
@ -119,4 +120,23 @@ vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(VCPKG_TARGET_IS_OSX)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Release")
file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/lib/release/*")
file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/bin/release/*")
file(COPY ${LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib/release/" "${CURRENT_PACKAGES_DIR}/bin/release/")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "Debug")
file(GLOB LIBS "${CURRENT_PACKAGES_DIR}/debug/lib/debug/*")
file(GLOB DLLS "${CURRENT_PACKAGES_DIR}/debug/bin/debug/*")
file(COPY ${LIBS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(COPY ${DLLS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/debug/" "${CURRENT_PACKAGES_DIR}/debug/bin/debug/")
endif()
endif()
vcpkg_fixup_pkgconfig()

View File

@ -163,13 +163,3 @@ diff --git a/OgreMain/CMakeLists.txt b/OgreMain/CMakeLists.txt
- set(OGRE_OSX_BUILD_CONFIGURATION "$(PLATFORM_NAME)/$(CONFIGURATION)")
add_custom_command(TARGET ${OGRE_NEXT}Main POST_BUILD
diff --git a/RenderSystems/Direct3D11/CMakeLists.txt b/RenderSystems/Direct3D11/CMakeLists.txt
--- a/RenderSystems/Direct3D11/CMakeLists.txt
+++ b/RenderSystems/Direct3D11/CMakeLists.txt
@@ -60,5 +60,5 @@
target_link_libraries(RenderSystem_Direct3D11 ${AMDAGS_LIBRARIES})
endif()
ogre_config_plugin(RenderSystem_Direct3D11)
-install(FILES ${HEADER_FILES} DESTINATION include/OGRE/RenderSystems/Direct3D11)
+install(FILES ${HEADER_FILES} DESTINATION include/${OGRE_NEXT_PREFIX}/RenderSystems/Direct3D11)

View File

@ -1,6 +1,6 @@
{
"name": "ogre-next",
"version": "2.3.2",
"version": "2.3.3",
"description": "Ogre 2.1 & 2.2 - scene-oriented, flexible 3D engine written in C++",
"homepage": "https://github.com/OGRECave/ogre-next",
"license": "MIT",
@ -9,7 +9,10 @@
"boost-thread",
"freeimage",
"freetype",
"openvr",
{
"name": "openvr",
"platform": "!osx"
},
"pkgconf",
"poco",
"rapidjson",

View File

@ -431,6 +431,7 @@ gul14:x64-android=fail
gz-tools2:arm-neon-android=fail
gz-tools2:x64-android=fail
gz-tools2:arm64-android=fail
gz-gui7:x64-osx=fail
halide:x64-windows-static=fail
hdf5:arm64-windows=fail
hdf5:arm-neon-android=fail

View File

@ -3198,7 +3198,7 @@
},
"gz-cmake3": {
"baseline": "3.4.1",
"port-version": 4
"port-version": 5
},
"gz-common5": {
"baseline": "5.4.1",
@ -3230,7 +3230,7 @@
},
"gz-rendering7": {
"baseline": "7.4.1",
"port-version": 0
"port-version": 1
},
"gz-sensors7": {
"baseline": "7.3.0",
@ -6153,7 +6153,7 @@
"port-version": 2
},
"ogre-next": {
"baseline": "2.3.2",
"baseline": "2.3.3",
"port-version": 0
},
"ois": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "76e06938007614b4fe523e37e368d7e39a40a9bc",
"version": "3.4.1",
"port-version": 5
},
{
"git-tree": "0238546ece05d52d030eb6dd62373ae4b65d1503",
"version": "3.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "29ca14723fbc8c73390ab5abe48b4e58cb0674b2",
"version": "7.4.1",
"port-version": 1
},
{
"git-tree": "5fa361453bcae9a0e8acee956057e9436f8d1377",
"version": "7.4.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ecf4c650a53fe5d7427f5fcb1e28302d42aad2c7",
"version": "2.3.3",
"port-version": 0
},
{
"git-tree": "e79346cd0f83209b8d6b14b8d486971918013ce9",
"version": "2.3.2",