Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ogre-next #19384

Merged
merged 7 commits into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
868 changes: 868 additions & 0 deletions recipes/ogre-next/add_OGRE_USE_NEW_PROJECT_NAME_cmake_option.patch

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions recipes/ogre-next/add_suffix_in_install_also_for_runtime.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
From 9332310060138c9a80bebfb7933bcefcfcdfb79c Mon Sep 17 00:00:00 2001
From: Silvio Traversaro <[email protected]>
Date: Sat, 25 Jun 2022 12:49:13 +0200
Subject: [PATCH] Update OgreConfigTargets.cmake

---
CMake/Utils/OgreConfigTargets.cmake | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake
index 74a08af3f26..2810001a1bc 100644
--- a/CMake/Utils/OgreConfigTargets.cmake
+++ b/CMake/Utils/OgreConfigTargets.cmake
@@ -98,28 +98,28 @@ function(ogre_install_target TARGETNAME SUFFIX EXPORT)
if(EXPORT)
install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
BUNDLE DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
- RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
+ RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_RELEASE_PATH}/Release" CONFIGURATIONS Release None ""
)
install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
BUNDLE DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
- RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
+ RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_RELWDBG_PATH}/RelWithDebInfo" CONFIGURATIONS RelWithDebInfo
)
install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
BUNDLE DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
- RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
+ RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_MINSIZE_PATH}/MinSizeRel" CONFIGURATIONS MinSizeRel
)
install(TARGETS ${TARGETNAME} #EXPORT Ogre-exports
BUNDLE DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
- RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
+ RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_DEBUG_PATH}/Debug" CONFIGURATIONS Debug
@@ -128,28 +128,28 @@ function(ogre_install_target TARGETNAME SUFFIX EXPORT)
else()
install(TARGETS ${TARGETNAME}
BUNDLE DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
- RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}" CONFIGURATIONS Release None ""
+ RUNTIME DESTINATION "bin${OGRE_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELEASE_PATH}${SUFFIX}" CONFIGURATIONS Release None ""
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_RELEASE_PATH}/Release" CONFIGURATIONS Release None ""
)
install(TARGETS ${TARGETNAME}
BUNDLE DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
- RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}" CONFIGURATIONS RelWithDebInfo
+ RUNTIME DESTINATION "bin${OGRE_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_RELWDBG_PATH}${SUFFIX}" CONFIGURATIONS RelWithDebInfo
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_RELWDBG_PATH}/RelWithDebInfo" CONFIGURATIONS RelWithDebInfo
)
install(TARGETS ${TARGETNAME}
BUNDLE DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
- RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}" CONFIGURATIONS MinSizeRel
+ RUNTIME DESTINATION "bin${OGRE_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_MINSIZE_PATH}${SUFFIX}" CONFIGURATIONS MinSizeRel
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_MINSIZE_PATH}/MinSizeRel" CONFIGURATIONS MinSizeRel
)
install(TARGETS ${TARGETNAME}
BUNDLE DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
- RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}" CONFIGURATIONS Debug
+ RUNTIME DESTINATION "bin${OGRE_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
LIBRARY DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
ARCHIVE DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_LIB_DEBUG_PATH}${SUFFIX}" CONFIGURATIONS Debug
FRAMEWORK DESTINATION "${OGRE_LIB_DIRECTORY}${OGRE_DEBUG_PATH}/Debug" CONFIGURATIONS Debug

38 changes: 38 additions & 0 deletions recipes/ogre-next/backport_hlms_bugfix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 5efd94a718a889a3996621e56039c0573aaa113e Mon Sep 17 00:00:00 2001
From: "Matias N. Goldberg" <[email protected]>
Date: Sat, 2 Apr 2022 20:09:51 -0300
Subject: [PATCH] Fix inconsistent DLL linkage

---
Components/Hlms/Pbs/CMakeLists.txt | 2 ++
Components/Hlms/Pbs/include/OgreHlmsPbsPrerequisites.h | 2 +-
Components/Hlms/Unlit/CMakeLists.txt | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Components/Hlms/Pbs/CMakeLists.txt b/Components/Hlms/Pbs/CMakeLists.txt
index c6a2f5fde40..48ffb610a21 100644
--- a/Components/Hlms/Pbs/CMakeLists.txt
+++ b/Components/Hlms/Pbs/CMakeLists.txt
@@ -40,6 +40,8 @@ if( OGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS )
ogre_add_component_include_dir( PlanarReflections )
endif()

+add_definitions( -DOgreHlmsPbs_EXPORTS )
+
ogre_add_library(${OGRE_NEXT}HlmsPbs ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
set_target_properties(${OGRE_NEXT}HlmsPbs PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
target_link_libraries(${OGRE_NEXT}HlmsPbs ${OGRE_NEXT}Main)
diff --git a/Components/Hlms/Unlit/CMakeLists.txt b/Components/Hlms/Unlit/CMakeLists.txt
index ff87fbec51d..b0348d0b1af 100644
--- a/Components/Hlms/Unlit/CMakeLists.txt
+++ b/Components/Hlms/Unlit/CMakeLists.txt
@@ -26,6 +26,8 @@ file(
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Common/include)

+add_definitions( -DOgreHlmsUnlit_EXPORTS )
+
ogre_add_library(${OGRE_NEXT}HlmsUnlit ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
set_target_properties(${OGRE_NEXT}HlmsUnlit PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
target_link_libraries(${OGRE_NEXT}HlmsUnlit ${OGRE_NEXT}Main)

46 changes: 46 additions & 0 deletions recipes/ogre-next/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
mkdir build
cd build

cmake ^
-G "Ninja" ^
-DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_SHARED_LIBS:BOOL=ON ^
-DBUILD_TESTING:BOOL=ON ^
-DOGRE_BUILD_TESTS=ON ^
-DOGRE_BUILD_DOCS:BOOL=ON ^
-DOGRE_BUILD_COMPONENT_HLMS:BOOL=ON ^
-DOGRE_BUILD_COMPONENT_HLMS_PBS:BOOL=ON ^
-DOGRE_BUILD_COMPONENT_HLMS_UNLIT:BOOL=ON ^
-DOGRE_BUILD_COMPONENT_OVERLAY:BOOL=ON ^
-DOGRE_BUILD_COMPONENT_PLANAR_REFLECTION:BOOLS=ON ^
-DOGRE_BUILD_RENDERSYSTEM_D3D11:BOOL=ON ^
-DOGRE_BUILD_RENDERSYSTEM_GL:BOOL=ON ^
-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS:BOOL=ON ^
-DOGRE_BUILD_RENDERSYSTEM_GLES:BOOL=OFF ^
-DOGRE_BUILD_RENDERSYSTEM_GLES2:BOOL=OFF ^
-DOGRE_BUILD_SAMPLES:BOOL=OFF ^
-DOGRE_BUILD_SAMPLES2:BOOL=OFF ^
-DOGRE_BUILD_TOOLS:BOOL=OFF ^
-DOGRE_CONFIG_UNIX_NO_X11:BOOL=OFF ^
-DOGRE_CONFIG_THREADS=0 ^
-DOGRE_CONFIG_THREAD_PROVIDER=std ^
-DOGRE_INSTALL_SAMPLES:BOOL=OFF ^
-DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF ^
-DOGRE_INSTALL_TOOLS:BOOL=OFF ^
-DOGRE_GLSUPPORT_USE_EGL_HEADLESS:BOOL=ON ^
-DOGRE_USE_NEW_PROJECT_NAME:BOOL=ON ^
%SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1
44 changes: 44 additions & 0 deletions recipes/ogre-next/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/sh

# Workaround for PRIu64 not being defined
# See https://github.com/conda-forge/staged-recipes/pull/18792#issuecomment-1114606992
export CXXFLAGS="-D__STDC_FORMAT_MACROS $CXXFLAGS"

rm -rf build
mkdir build
cd build

cmake ${CMAKE_ARGS} .. \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=ON \
-DOGRE_BUILD_TESTS=ON \
-DOGRE_BUILD_DOCS:BOOL=OFF \
-DOGRE_BUILD_COMPONENT_HLMS=ON \
-DOGRE_BUILD_COMPONENT_HLMS_PBS=ON \
-DOGRE_BUILD_COMPONENT_HLMS_UNLIT=ON \
-DOGRE_BUILD_COMPONENT_OVERLAY=ON \
-DOGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS=ON \
-DOGRE_BUILD_LIBS_AS_FRAMEWORKS:BOOL=OFF \
-DOGRE_BUILD_RENDERSYSTEM_GLES2:BOOL=OFF \
-DOGRE_BUILD_RENDERSYSTEM_METAL:BOOL=OFF \
-DOGRE_BUILD_SAMPLES:BOOL=OFF \
-DOGRE_BUILD_SAMPLES2:BOOL=OFF \
-DOGRE_BUILD_TOOLS:BOOL=OFF \
-DOGRE_CONFIG_UNIX_NO_X11:BOOL=OFF \
-DOGRE_CONFIG_THREADS=0 \
-DOGRE_CONFIG_THREAD_PROVIDER=std \
-DOGRE_INSTALL_SAMPLES:BOOL=OFF \
-DOGRE_INSTALL_SAMPLES_SOURCE:BOOL=OFF \
-DOGRE_INSTALL_TOOLS:BOOL=OFF \
-DOGRE_GLSUPPORT_USE_EGL_HEADLESS:BOOL=ON \
-DOGRE_USE_NEW_PROJECT_NAME:BOOL=ON \
..

cmake --build . --config Release --parallel ${CPU_COUNT}

if [[ "${CONDA_BUILD_CROSS_COMPILATION:-}" != "1" || "${CROSSCOMPILING_EMULATOR}" != "" ]]; then
ctest --output-on-failure -C Release
fi

cmake --build . --config Release --target install
Loading