-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patches from gazebo-forks/ogre-next
Signed-off-by: Michael Carroll <[email protected]>
- Loading branch information
Showing
3 changed files
with
183 additions
and
1 deletion.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
recipe/0001-Add-option-to-force-pkg-config-on-Windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
From f17f54eb4ff4d67ca84041fd8e030eb18ef07204 Mon Sep 17 00:00:00 2001 | ||
From: Michael Carroll <[email protected]> | ||
Date: Tue, 23 Aug 2022 15:20:37 -0500 | ||
Subject: [PATCH 1/2] Add option to force pkg-config on Windows | ||
|
||
Signed-off-by: Michael Carroll <[email protected]> | ||
--- | ||
CMake/ConfigureBuild.cmake | 16 +++++++++++++++- | ||
CMake/Templates/OGRE.pc.in | 2 +- | ||
CMakeLists.txt | 2 +- | ||
3 files changed, 17 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake | ||
index 9d3b1b27d7..05e3cca52e 100644 | ||
--- a/CMake/ConfigureBuild.cmake | ||
+++ b/CMake/ConfigureBuild.cmake | ||
@@ -253,9 +253,17 @@ install( FILES | ||
DESTINATION include/${OGRE_NEXT_PREFIX} | ||
) | ||
|
||
+if (UNIX) | ||
+ # Always generate package config files on Unix systems | ||
+ set(OGRE_GENERATE_PKGCONFIG TRUE) | ||
+else() | ||
+ # For Windows, check for opt-in configuration of pkg-config | ||
+ set(OGRE_GENERATE_PKGCONFIG ${OGRE_CONFIG_GENERATE_PKGCONFIG}) | ||
+endif() | ||
+ | ||
|
||
# Create the pkg-config package files on Unix systems | ||
-if (UNIX) | ||
+if (OGRE_GENERATE_PKGCONFIG) | ||
set(OGRE_LIB_SUFFIX "") | ||
set(OGRE_PLUGIN_PREFIX "") | ||
set(OGRE_PLUGIN_EXT ".so") | ||
@@ -269,6 +277,12 @@ if (UNIX) | ||
set(OGRE_LIB_SUFFIX "${OGRE_LIB_SUFFIX}_d") | ||
endif () | ||
|
||
+ if (WIN32) | ||
+ set(OGRE_PLUGIN_DIRECTORY bin) | ||
+ else() | ||
+ set(OGRE_PLUGIN_DIRECTORY ${OGRE_LIB_DIRECTORY}) | ||
+ endif() | ||
+ | ||
set(OGRE_ADDITIONAL_LIBS "") | ||
set(OGRE_CFLAGS "") | ||
set(OGRE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}) | ||
diff --git a/CMake/Templates/OGRE.pc.in b/CMake/Templates/OGRE.pc.in | ||
index ce726134a9..aea9ea4bb2 100644 | ||
--- a/CMake/Templates/OGRE.pc.in | ||
+++ b/CMake/Templates/OGRE.pc.in | ||
@@ -2,7 +2,7 @@ prefix=@OGRE_PREFIX_PATH@ | ||
exec_prefix=${prefix} | ||
libdir=${prefix}/@OGRE_LIB_DIRECTORY@ | ||
includedir=${prefix}/include | ||
-plugindir=${libdir}/@OGRE_NEXT_PREFIX@ | ||
+plugindir=${prefix}/@OGRE_PLUGIN_DIRECTORY@/@OGRE_NEXT_PREFIX@ | ||
|
||
Name: @OGRE_NEXT_PREFIX@ | ||
Description: Object-Oriented Graphics Rendering Engine | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 36a202b0a2..671272b173 100755 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -478,7 +478,7 @@ option(OGRE_BUILD_TESTS "Build the unit tests & PlayPen" FALSE) | ||
option(OGRE_CONFIG_DOUBLE "Use doubles instead of floats in Ogre" FALSE) | ||
option(OGRE_CONFIG_NODE_INHERIT_TRANSFORM "Tells the node whether it should inherit full transform from it's parent node or derived position, orientation and scale" FALSE) | ||
|
||
- | ||
+option(OGRE_CONFIG_GENERATE_PKGCONFIG "Force pkg-config generation on non-Unix platforms" FALSE) | ||
set(OGRE_PLUGIN_LIB_PREFIX "" CACHE STRING "Prefix dynamically linked plugins, e.g. 'lib' (GCC and Clang only)") | ||
|
||
if (WINDOWS_STORE OR WINDOWS_PHONE) | ||
-- | ||
2.34.1 | ||
|
103 changes: 103 additions & 0 deletions
103
recipe/0002-Include-suffix-in-binary-install-paths-on-Windows.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
From a6ecf49c0ddaac1ab92b47242952451cbf0a4e5b Mon Sep 17 00:00:00 2001 | ||
From: Michael Carroll <[email protected]> | ||
Date: Tue, 23 Aug 2022 15:21:14 -0500 | ||
Subject: [PATCH 2/2] Include suffix in binary install paths on Windows | ||
|
||
Signed-off-by: Michael Carroll <[email protected]> | ||
--- | ||
CMake/Utils/OgreConfigTargets.cmake | 53 +++++++++++------------------ | ||
1 file changed, 20 insertions(+), 33 deletions(-) | ||
|
||
diff --git a/CMake/Utils/OgreConfigTargets.cmake b/CMake/Utils/OgreConfigTargets.cmake | ||
index d8e020860a..42757e93a5 100644 | ||
--- a/CMake/Utils/OgreConfigTargets.cmake | ||
+++ b/CMake/Utils/OgreConfigTargets.cmake | ||
@@ -41,36 +41,23 @@ if (NOT OGRE_RUNTIME_OUTPUT) | ||
set(OGRE_RUNTIME_OUTPUT ${OGRE_BINARY_DIR}/bin) | ||
endif () | ||
|
||
-if (WIN32) | ||
- set(OGRE_RELEASE_PATH "/Release") | ||
- set(OGRE_RELWDBG_PATH "/RelWithDebInfo") | ||
- set(OGRE_MINSIZE_PATH "/MinSizeRel") | ||
- set(OGRE_DEBUG_PATH "/Debug") | ||
+set(OGRE_RELEASE_PATH "") | ||
+set(OGRE_RELWDBG_PATH "") | ||
+set(OGRE_MINSIZE_PATH "") | ||
+set(OGRE_DEBUG_PATH "") | ||
+set(OGRE_LIB_RELEASE_PATH "") | ||
+set(OGRE_LIB_RELWDBG_PATH "") | ||
+set(OGRE_LIB_MINSIZE_PATH "") | ||
+set(OGRE_LIB_DEBUG_PATH "") | ||
+if(APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS) | ||
set(OGRE_LIB_RELEASE_PATH "/Release") | ||
- set(OGRE_LIB_RELWDBG_PATH "/RelWithDebInfo") | ||
- set(OGRE_LIB_MINSIZE_PATH "/MinSizeRel") | ||
- set(OGRE_LIB_DEBUG_PATH "/Debug") | ||
- set(OGRE_PLUGIN_PATH "/opt") | ||
- set(OGRE_SAMPLE_PATH "/opt/samples") | ||
-elseif (UNIX) | ||
- set(OGRE_RELEASE_PATH "") | ||
- set(OGRE_RELWDBG_PATH "") | ||
- set(OGRE_MINSIZE_PATH "") | ||
- set(OGRE_DEBUG_PATH "") | ||
- set(OGRE_LIB_RELEASE_PATH "") | ||
- set(OGRE_LIB_RELWDBG_PATH "") | ||
- set(OGRE_LIB_MINSIZE_PATH "") | ||
- set(OGRE_LIB_DEBUG_PATH "") | ||
- if(APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS) | ||
- set(OGRE_LIB_RELEASE_PATH "/Release") | ||
- endif(APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS) | ||
- if (APPLE) | ||
- set(OGRE_PLUGIN_PATH "/") | ||
- else() | ||
- set(OGRE_PLUGIN_PATH "/${OGRE_NEXT_PREFIX}") | ||
- endif(APPLE) | ||
- set(OGRE_SAMPLE_PATH "/${OGRE_NEXT_PREFIX}/Samples") | ||
-endif () | ||
+endif(APPLE AND OGRE_BUILD_PLATFORM_APPLE_IOS) | ||
+if (APPLE) | ||
+ set(OGRE_PLUGIN_PATH "/") | ||
+else() | ||
+ set(OGRE_PLUGIN_PATH "/${OGRE_NEXT_PREFIX}") | ||
+endif(APPLE) | ||
+set(OGRE_SAMPLE_PATH "/${OGRE_NEXT_PREFIX}/Samples") | ||
|
||
# create vcproj.user file for Visual Studio to set debug working directory | ||
function(ogre_create_vcproj_userfile TARGETNAME) | ||
@@ -130,28 +117,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 | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters