* Update to 13.4.4

* Update versions

* Fix obsolete zziplib reference

* Fix another resource path

* Update versions

* Patch pc file generation

* Update versions

* Force uniform cfg install path for osx

* Update versions

* Acquire swig if needed

* Update versions
This commit is contained in:
Kai Pastor 2022-10-13 20:58:22 +02:00 коммит произвёл GitHub
Родитель 72bb4a7148
Коммит 101931754a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
14 изменённых файлов: 422 добавлений и 502 удалений

Просмотреть файл

@ -0,0 +1,36 @@
diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake
index cfe7db3..5d15212 100644
--- a/CMake/InstallResources.cmake
+++ b/CMake/InstallResources.cmake
@@ -61,7 +61,6 @@ elseif (APPLE)
endif()
# these are resolved relative to the app bundle
set(OGRE_SAMPLES_DIR_REL "Contents/Plugins/")
- set(OGRE_CFG_INSTALL_PATH "bin")
elseif (UNIX)
set(OGRE_TEST_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/Tests/Media")
set(OGRE_SAMPLES_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_LIB_DIRECTORY}/OGRE/Samples")
@@ -162,6 +161,10 @@ if(NOT OGRE_BUILD_TESTS)
endif()
+set(OGRE_PLUGIN_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_PLUGINS_PATH}")
+cmake_path(RELATIVE_PATH OGRE_PLUGIN_DIR_REL BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${OGRE_CFG_INSTALL_PATH}")
+set(OGRE_MEDIA_DIR_REL "${CMAKE_INSTALL_PREFIX}/${OGRE_MEDIA_PATH}")
+cmake_path(RELATIVE_PATH OGRE_MEDIA_DIR_REL BASE_DIRECTORY "${CMAKE_INSTALL_PREFIX}/${OGRE_CFG_INSTALL_PATH}")
set(OGRE_CORE_MEDIA_DIR "${OGRE_MEDIA_DIR_REL}")
# CREATE CONFIG FILES - INSTALL VERSIONS
configure_file(${OGRE_TEMPLATES_DIR}/resources.cfg.in ${PROJECT_BINARY_DIR}/inst/bin/resources.cfg)
diff --git a/Components/Bites/CMakeLists.txt b/Components/Bites/CMakeLists.txt
index 045e288..50c9956 100644
--- a/Components/Bites/CMakeLists.txt
+++ b/Components/Bites/CMakeLists.txt
@@ -135,7 +135,7 @@ elseif(UNIX)
set_source_files_properties(src/OgreBitesConfigDialog.cpp PROPERTIES COMPILE_DEFINITIONS HAVE_XAW)
list(APPEND SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreGLXConfigDialog.cpp")
list(APPEND DEPENDENCIES ${X11_Xt_LIB} ${XAW_LIBRARY})
- install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/GLX_backdrop.png" DESTINATION "share/OGRE/")
+ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/misc/GLX_backdrop.png" DESTINATION "${OGRE_MEDIA_PATH}/..")
endif()
endif()

Просмотреть файл

@ -1,14 +0,0 @@
diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
index 068dd27..721121b 100644
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
@@ -346,7 +346,9 @@ if(NOT ANDROID AND NOT EMSCRIPTEN)
)
endif()
+ if (0)
find_package(Qt5 COMPONENTS Core Gui QUIET)
+ endif()
macro_log_feature(Qt5_FOUND "Qt" "optional integration with the Qt Library for window creation and input" "http://www.qt.io/" FALSE "" "")
endif()

Просмотреть файл

@ -1,14 +0,0 @@
diff --git a/CMake/FeatureSummary.cmake b/CMake/OgreFeatureSummary.cmake
similarity index 100%
rename from CMake/FeatureSummary.cmake
rename to CMake/OgreFeatureSummary.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb86305..abbd5c4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -505,4 +505,4 @@ include(Packaging)
# Show feature summary
-include(FeatureSummary)
+include(OgreFeatureSummary)

Просмотреть файл

@ -0,0 +1,215 @@
diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
index b0c5ba3..27d7bd2 100644
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
@@ -194,11 +194,14 @@ endif()
#######################################################################
# Find FreeImage
-find_package(FreeImage)
+find_package(FreeImage NAMES freeimage)
+set(FreeImage_LIBRARIES freeimage::FreeImage)
+set(FreeImage_LIBRARY_DBG "-lFreeImaged")
+set(FreeImage_LIBRARY_REL "-lFreeImage")
macro_log_feature(FreeImage_FOUND "freeimage" "Support for commonly used graphics image formats" "http://freeimage.sourceforge.net")
# Find FreeType
-find_package(Freetype)
+find_package(FREETYPE NAMES freetype)
macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org")
# Find X11
@@ -254,13 +257,17 @@ endif ()
macro_log_feature(ENV{VULKAN_SDK} "Vulkan SDK" "Vulkan RenderSystem, glslang Plugin. Alternatively use system packages" "https://vulkan.lunarg.com/")
# OpenEXR
-find_package(OpenEXR)
+find_package(IMath CONFIG)
+find_package(OPENEXR NAMES OpenEXR)
+set(OPENEXR_LIBRARIES OpenEXR::OpenEXR Imath::Imath)
macro_log_feature(OPENEXR_FOUND "OpenEXR" "Load High dynamic range images" "http://www.openexr.com/")
# Python
set(Python_ADDITIONAL_VERSIONS 3.4) # allows using python3 on Ubuntu 14.04
-find_package(PythonInterp)
-find_package(PythonLibs)
+find_package(Python3 COMPONENTS Development Interpreter) # Interpreter is needed for Python3_FOUND
+set(PYTHONLIBS_FOUND "${Python3_FOUND}")
+set(PYTHON_INCLUDE_PATH "${Python3_INCLUDE_DIRS}")
+set(PYTHON_LIBRARIES "${Python3_LIBRARIES}")
macro_log_feature(PYTHONLIBS_FOUND "Python" "Language bindings to use OGRE from Python" "http://www.python.org/")
# SWIG
@@ -268,7 +275,7 @@ find_package(SWIG 3.0.8 QUIET)
macro_log_feature(SWIG_FOUND "SWIG" "Language bindings (Python, Java, C#) for OGRE" "http://www.swig.org/")
# pugixml
-find_package(pugixml QUIET)
+find_package(pugixml CONFIG REQUIRED)
macro_log_feature(pugixml_FOUND "pugixml" "Needed for XMLConverter and DotScene Plugin" "https://pugixml.org/")
# Find zlib
@@ -276,7 +283,7 @@ find_package(ZLIB)
macro_log_feature(ZLIB_FOUND "zlib" "Simple data compression library" "http://www.zlib.net")
# Assimp
-find_package(assimp QUIET)
+find_package(assimp CONFIG)
macro_log_feature(assimp_FOUND "Assimp" "Needed for the AssimpLoader Plugin" "https://www.assimp.org/")
# Bullet
@@ -284,6 +291,8 @@ find_package(Bullet QUIET)
macro_log_feature(BULLET_FOUND "Bullet" "Bullet physics" "https://pybullet.org")
if(assimp_FOUND)
+ add_library(fix::assimp ALIAS assimp::assimp)
+elseif(0)
# workaround horribly broken assimp cmake, fixed with assimp 5.1
add_library(fix::assimp INTERFACE IMPORTED)
set_target_properties(fix::assimp PROPERTIES
@@ -302,7 +311,7 @@ endif()
# Find sdl2
if(NOT ANDROID AND NOT EMSCRIPTEN)
# find script does not work in cross compilation environment
- find_package(SDL2 QUIET)
+ find_package(SDL2 CONFIG REQUIRED)
macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/")
if(SDL2_FOUND AND NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 INTERFACE IMPORTED)
@@ -315,6 +324,7 @@ if(NOT ANDROID AND NOT EMSCRIPTEN)
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui QUIET CONFIG)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui QUIET CONFIG)
+ set(QT_FOUND FALSE)
macro_log_feature(QT_FOUND "Qt" "optional integration with the Qt Library for window creation and input" "http://www.qt.io/")
endif()
diff --git a/CMake/Templates/OGREConfig.cmake.in b/CMake/Templates/OGREConfig.cmake.in
index 2047f66..a5c7cd0 100644
--- a/CMake/Templates/OGREConfig.cmake.in
+++ b/CMake/Templates/OGREConfig.cmake.in
@@ -35,6 +35,25 @@ set(OGRE_LIBRARIES)
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
+include(CMakeFindDependencyMacro)
+find_dependency(pugixml CONFIG)
+find_dependency(SDL2 CONFIG)
+find_dependency(ZLIB)
+find_dependency(freetype CONFIG)
+if (@OGRE_BUILD_COMPONENT_OVERLAY_IMGUI@)
+ find_dependency(imgui CONFIG)
+endif()
+if(@OGRE_BUILD_PLUGIN_ASSIMP@)
+ find_dependency(assimp CONFIG)
+endif()
+if(@OGRE_BUILD_PLUGIN_FREEIMAGE@)
+ find_dependency(freeimage CONFIG)
+endif()
+if(@OGRE_BUILD_PLUGIN_EXRCODEC@)
+ find_dependency(Imath CONFIG)
+ find_dependency(OpenEXR CONFIG)
+endif()
+
if(@OGRE_THREAD_PROVIDER@ EQUAL 1)
list(APPEND OGRE_INCLUDE_DIRS @Boost_INCLUDE_DIRS@)
endif()
diff --git a/Components/Bites/CMakeLists.txt b/Components/Bites/CMakeLists.txt
index 8f96cef..045e288 100644
--- a/Components/Bites/CMakeLists.txt
+++ b/Components/Bites/CMakeLists.txt
@@ -171,6 +171,12 @@ elseif(NOT EMSCRIPTEN)
message(WARNING "SDL2 not found - no input handling and reduced window creation capabilites")
endif()
+if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+ find_package(imgui CONFIG REQUIRED)
+ find_path(IMGUI_DIR NAMES imgui.h)
+ target_link_libraries(OgreBites PRIVATE imgui::imgui)
+endif()
+
generate_export_header(OgreBites
EXPORT_MACRO_NAME _OgreBitesExport
EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreBitesPrerequisites.h)
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
index 0c74ce2..a302b1c 100644
--- a/Components/Overlay/CMakeLists.txt
+++ b/Components/Overlay/CMakeLists.txt
@@ -19,6 +19,8 @@ list(APPEND HEADER_FILES
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+ find_package(imgui CONFIG REQUIRED)
+elseif(0)
set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.87" CACHE PATH "")
if(NOT EXISTS ${IMGUI_DIR})
message(STATUS "Downloading imgui")
@@ -63,6 +65,8 @@ elseif(UNIX)
endif()
if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE imgui::imgui)
+elseif(0)
target_include_directories(OgreOverlay PUBLIC
PUBLIC "$<BUILD_INTERFACE:${IMGUI_DIR}>"
PRIVATE "$<BUILD_INTERFACE:${IMGUI_DIR}/misc/freetype>")
diff --git a/PlugIns/EXRCodec/src/OgreEXRCodec.cpp b/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
index 0822081..a22841c 100644
--- a/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
+++ b/PlugIns/EXRCodec/src/OgreEXRCodec.cpp
@@ -36,6 +36,9 @@ THE SOFTWARE.
#include "O_IStream.h"
#include <cmath>
+#include <ImathBox.h>
+#include <ImfFrameBuffer.h>
+#include <ImfHeader.h>
#include <ImfOutputFile.h>
#include <ImfInputFile.h>
#include <ImfChannelList.h>
diff --git a/PlugIns/STBICodec/CMakeLists.txt b/PlugIns/STBICodec/CMakeLists.txt
index 10283f5..e7edfd3 100644
--- a/PlugIns/STBICodec/CMakeLists.txt
+++ b/PlugIns/STBICodec/CMakeLists.txt
@@ -19,8 +19,10 @@ endif()
add_library(Codec_STBI ${OGRE_LIB_TYPE} ${HEADER_FILES} ${SOURCES})
target_link_libraries(Codec_STBI PUBLIC OgreMain)
+find_path(STB_INCLUDE_DIRS "stb_image.h")
target_include_directories(Codec_STBI PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
+ "$<BUILD_INTERFACE:${STB_INCLUDE_DIRS}>"
$<INSTALL_INTERFACE:include/OGRE/Plugins/STBICodec>)
if(CMAKE_COMPILER_IS_GNUCXX)
diff --git a/PlugIns/STBICodec/src/OgreSTBICodec.cpp b/PlugIns/STBICodec/src/OgreSTBICodec.cpp
index 663a1c3..e1452cb 100644
--- a/PlugIns/STBICodec/src/OgreSTBICodec.cpp
+++ b/PlugIns/STBICodec/src/OgreSTBICodec.cpp
@@ -39,7 +39,7 @@ THE SOFTWARE.
#define STBI_NO_STDIO
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_STATIC
-#include "stbi/stb_image.h"
+#include "stb_image.h"
#ifdef HAVE_ZLIB
#include <zlib.h>
@@ -62,7 +62,7 @@ static Ogre::uchar* custom_zlib_compress(Ogre::uchar* data, int data_len, int* o
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define STBI_WRITE_NO_STDIO
-#include "stbi/stb_image_write.h"
+#include "stb_image_write.h"
namespace Ogre {
@@ -73,7 +73,7 @@ namespace Ogre {
stbi_convert_iphone_png_to_rgb(1);
stbi_set_unpremultiply_on_load(1);
- LogManager::getSingleton().logMessage("stb_image - v2.27 - public domain image loader");
+ LogManager::getSingleton().logMessage("stb_image - public domain image loader");
// Register codecs
String exts = "jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr";

Просмотреть файл

@ -1,123 +0,0 @@
diff --git a/CMake/Dependencies.cmake b/CMake/Dependencies.cmake
index 14c9290..ee8dab3 100644
--- a/CMake/Dependencies.cmake
+++ b/CMake/Dependencies.cmake
@@ -242,7 +242,7 @@ find_package(FreeImage)
macro_log_feature(FreeImage_FOUND "freeimage" "Support for commonly used graphics image formats" "http://freeimage.sourceforge.net" FALSE "" "")
# Find FreeType
-find_package(Freetype)
+find_package(freetype CONFIG REQUIRED)
macro_log_feature(FREETYPE_FOUND "freetype" "Portable font engine" "http://www.freetype.org" FALSE "" "")
# Find X11
@@ -310,11 +310,11 @@ find_package(SWIG 3.0.8 QUIET)
macro_log_feature(SWIG_FOUND "SWIG" "Language bindings (Python, Java, C#) for OGRE" "http://www.swig.org/" FALSE "" "")
# pugixml
-find_package(pugixml QUIET)
+find_package(pugixml CONFIG REQUIRED)
macro_log_feature(pugixml_FOUND "pugixml" "Needed for XMLConverter and DotScene Plugin" "https://pugixml.org/" FALSE "" "")
# Assimp
-find_package(ASSIMP QUIET)
+find_package(assimp CONFIG REQUIRED)
macro_log_feature(ASSIMP_FOUND "Assimp" "Needed for the AssimpLoader Plugin" "https://www.assimp.org/" FALSE "" "")
if(ASSIMP_FOUND)
@@ -336,7 +336,7 @@ endif()
# Find sdl2
if(NOT ANDROID AND NOT EMSCRIPTEN)
# find script does not work in cross compilation environment
- find_package(SDL2 QUIET)
+ find_package(SDL2 CONFIG REQUIRED)
macro_log_feature(SDL2_FOUND "SDL2" "Simple DirectMedia Library needed for input handling in samples" "https://www.libsdl.org/" FALSE "" "")
if(SDL2_FOUND AND NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 INTERFACE IMPORTED)
diff --git a/CMake/Templates/OGREConfig.cmake.in b/CMake/Templates/OGREConfig.cmake.in
index 392c89c..a79ff8d 100644
--- a/CMake/Templates/OGREConfig.cmake.in
+++ b/CMake/Templates/OGREConfig.cmake.in
@@ -32,6 +32,18 @@ get_filename_component(OGRE_LIBRARY_DIRS "${OGRE_PREFIX_DIR}/lib" ABSOLUTE)
get_filename_component(OGRE_INCLUDE_DIRS "${OGRE_PREFIX_DIR}/include/OGRE" ABSOLUTE)
set(OGRE_LIBRARIES)
+include(CMakeFindDependencyMacro)
+
+find_dependency(pugixml CONFIG)
+find_dependency(SDL2 CONFIG)
+find_dependency(ZLIB)
+find_dependency(assimp CONFIG)
+find_dependency(freetype CONFIG)
+
+if (@OGRE_BUILD_COMPONENT_OVERLAY_IMGUI@)
+ find_dependency(imgui CONFIG)
+endif()
+
cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)
diff --git a/Components/Bites/CMakeLists.txt b/Components/Bites/CMakeLists.txt
index 5d58a8d..fe41e4a 100644
--- a/Components/Bites/CMakeLists.txt
+++ b/Components/Bites/CMakeLists.txt
@@ -152,6 +152,11 @@ elseif(NOT EMSCRIPTEN)
message(WARNING "SDL2 not found - no input handling and reduced window creation capabilites")
endif()
+if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+ find_package(imgui CONFIG REQUIRED)
+ target_link_libraries(OgreBites PRIVATE imgui::imgui)
+endif()
+
generate_export_header(OgreBites
EXPORT_MACRO_NAME _OgreBitesExport
EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/include/OgreBitesPrerequisites.h)
diff --git a/Components/Overlay/CMakeLists.txt b/Components/Overlay/CMakeLists.txt
index df8f32a..42be1e8 100644
--- a/Components/Overlay/CMakeLists.txt
+++ b/Components/Overlay/CMakeLists.txt
@@ -19,21 +19,8 @@ list(APPEND HEADER_FILES
file(GLOB SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
- set(IMGUI_DIR "${PROJECT_BINARY_DIR}/imgui-1.77" CACHE PATH "")
- if(NOT EXISTS ${IMGUI_DIR})
- message(STATUS "Dowloading imgui")
- file(DOWNLOAD
- https://github.com/ocornut/imgui/archive/v1.77.tar.gz
- ${PROJECT_BINARY_DIR}/imgui.tar.gz)
- execute_process(COMMAND ${CMAKE_COMMAND}
- -E tar xf imgui.tar.gz WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
- endif()
- list(APPEND SOURCE_FILES
- ${IMGUI_DIR}/imgui.cpp
- ${IMGUI_DIR}/imgui_draw.cpp
- ${IMGUI_DIR}/imgui_widgets.cpp
- ${IMGUI_DIR}/imgui_demo.cpp
- ${IMGUI_DIR}/misc/freetype/imgui_freetype.cpp)
+ find_package(imgui CONFIG REQUIRED)
+ find_path(IMGUI_INCLUDE_DIR imgui.h)
else()
list(REMOVE_ITEM SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/OgreImGuiOverlay.cpp")
endif()
@@ -41,13 +28,17 @@ endif()
# setup target
add_library(OgreOverlay ${OGRE_COMP_LIB_TYPE} ${HEADER_FILES} ${SOURCE_FILES})
set_target_properties(OgreOverlay PROPERTIES VERSION ${OGRE_SOVERSION} SOVERSION ${OGRE_SOVERSION})
-target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE ${FREETYPE_LIBRARIES} ZLIB::ZLIB)
+if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB imgui::imgui)
+else()
+ target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE freetype ZLIB::ZLIB)
+endif()
target_include_directories(OgreOverlay PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include/OGRE/Overlay>
PRIVATE ${FREETYPE_INCLUDE_DIRS})
-if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
+if(0)
target_include_directories(OgreOverlay PUBLIC
PUBLIC "$<BUILD_INTERFACE:${IMGUI_DIR}>"
PRIVATE "$<BUILD_INTERFACE:${IMGUI_DIR}/misc/freetype>")

Просмотреть файл

@ -1,27 +0,0 @@
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
index 73606c9..4377353 100644
--- a/CMake/ConfigureBuild.cmake
+++ b/CMake/ConfigureBuild.cmake
@@ -175,11 +175,19 @@ if (UNIX)
set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} -lpthread")
endif ()
if (OGRE_STATIC)
- if (OGRE_CONFIG_THREADS)
- set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} -lboost-thread-mt")
+ if (OGRE_CONFIG_THREADS AND OGRE_CONFIG_THREAD_PROVIDER STREQUAL "boost")
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} ${Boost_THREAD_LIBRARY_DEBUG}")
+ else()
+ set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} ${Boost_THREAD_LIBRARY_RELEASE}")
+ endif()
endif ()
# there is no pkgconfig file for freeimage, so we need to add that lib manually
- set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} -lfreeimage")
+ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} ${FreeImage_LIBRARY_DBG}")
+ else()
+ set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} ${FreeImage_LIBRARY_REL}")
+ endif()
configure_file(${OGRE_TEMPLATES_DIR}/OGREStatic.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE.pc @ONLY)
else ()
configure_file(${OGRE_TEMPLATES_DIR}/OGRE.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE.pc @ONLY)

Просмотреть файл

@ -0,0 +1,30 @@
diff --git a/CMake/ConfigureBuild.cmake b/CMake/ConfigureBuild.cmake
index 614332c..f4bc402 100644
--- a/CMake/ConfigureBuild.cmake
+++ b/CMake/ConfigureBuild.cmake
@@ -185,6 +185,13 @@ if (UNIX)
else()
set(OGRE_ADDITIONAL_LIBS "${OGRE_ADDITIONAL_LIBS} ${FreeImage_LIBRARY_REL}")
endif()
+ set(PC_REQUIRES_STATIC "")
+ if(OGRE_BUILD_COMPONENT_OVERLAY)
+ string(APPEND PC_REQUIRES_STATIC " freetype2")
+ endif()
+ if(X11_X11_LIB)
+ string(APPEND PC_REQUIRES_STATIC " x11 xt xaw7 gl")
+ endif()
configure_file(${OGRE_TEMPLATES_DIR}/OGREStatic.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE.pc @ONLY)
else ()
configure_file(${OGRE_TEMPLATES_DIR}/OGRE.pc.in ${PROJECT_BINARY_DIR}/pkgconfig/OGRE.pc @ONLY)
diff --git a/CMake/Templates/OGREStatic.pc.in b/CMake/Templates/OGREStatic.pc.in
index 4e4202b..f9b7f5a 100644
--- a/CMake/Templates/OGREStatic.pc.in
+++ b/CMake/Templates/OGREStatic.pc.in
@@ -8,6 +8,6 @@ Name: OGRE (static lib)
Description: Object-Oriented Graphics Rendering Engine
Version: @OGRE_VERSION@
URL: http://www.ogre3d.org
-Requires: freetype2, zziplib, x11, xt, xaw7, gl
+Requires: @PC_REQUIRES_STATIC@
Libs: -L${libdir} -L${plugindir} -lOgreMain@OGRE_LIB_SUFFIX@ @OGRE_ADDITIONAL_LIBS@
Cflags: -I${includedir} -I${includedir}/OGRE @OGRE_CFLAGS@

Просмотреть файл

@ -6,41 +6,57 @@ if(NOT VCPKG_TARGET_IS_WINDOWS)
message("${PORT} currently requires the following library from the system package manager:\n Xaw\n\nIt can be installed on Ubuntu systems via apt-get install libxaw7-dev")
endif()
if(VCPKG_TARGET_IS_ANDROID OR VCPKG_TARGET_IS_IOS OR VCPKG_TARGET_IS_EMSCRIPTEN)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OGRECave/ogre
REF 7d0c8181ac43ad20bdba326abbd3deeddf310f0b #v1.12.9
SHA512 f223075f49a2465cd5070f5efa796aa715f3ea2fefd578e4ec0a11be2fd3330922849ed804e1df004209abafaa7b24ff42432dd79f336a56063e3cf38ae0e8c9
REF v13.4.4
SHA512 59e0929f5022b2d289030d42c651ce4f44a215be7aae262b1b6919e1d00225d226cce6bfa2e78525ae902290615c87eabe7b8dfe27b7087dd56081460bd35e1f
HEAD_REF master
PATCHES
toolchain_fixes.patch
fix-dependency.patch
disable-dependency-qt.patch
fix-pkgconfig.patch
fix-cmake-feature-summary.patch
fix-dependencies.patch
cfg-rel-paths.patch
swig-python-polyfill.patch
pkgconfig.patch
)
file(REMOVE "${SOURCE_PATH}/CMake/Packages/FindOpenEXR.cmake")
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(OGRE_STATIC ON)
else()
set(OGRE_STATIC OFF)
endif()
# Configure features
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" OGRE_STATIC)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" OGRE_CONFIG_STATIC_LINK_CRT)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
assimp OGRE_BUILD_PLUGIN_ASSIMP
assimp CMAKE_REQUIRE_FIND_PACKAGE_assimp
d3d9 OGRE_BUILD_RENDERSYSTEM_D3D9
freeimage OGRE_BUILD_PLUGIN_FREEIMAGE
freeimage CMAKE_REQUIRE_FIND_PACKAGE_FreeImage
java OGRE_BUILD_COMPONENT_JAVA
java CMAKE_REQUIRE_FIND_PACKAGE_SWIG
openexr OGRE_BUILD_PLUGIN_EXRCODEC
openexr CMAKE_REQUIRE_FIND_PACKAGE_OpenEXR
python OGRE_BUILD_COMPONENT_PYTHON
python CMAKE_REQUIRE_FIND_PACKAGE_Python3
python CMAKE_REQUIRE_FIND_PACKAGE_SWIG
csharp OGRE_BUILD_COMPONENT_CSHARP
csharp CMAKE_REQUIRE_FIND_PACKAGE_SWIG
overlay OGRE_BUILD_COMPONENT_OVERLAY
zziplib OGRE_CONFIG_ENABLE_ZIP
overlay CMAKE_REQUIRE_FIND_PACKAGE_FREETYPE
zip OGRE_CONFIG_ENABLE_ZIP
strict OGRE_RESOURCEMANAGER_STRICT
tools OGRE_BUILD_TOOLS
tools OGRE_INSTALL_TOOLS
)
if(CMAKE_REQUIRE_FIND_PACKAGE_SWIG)
vcpkg_find_acquire_program(SWIG)
vcpkg_list(APPEND FEATURE_OPTIONS "-DSWIG_EXECUTABLE=${SWIG}")
endif()
# OGRE_RESOURCEMANAGER_STRICT need to be 0 for OFF and 1 for ON, because it is used 'as is' in sources
string(REPLACE "OGRE_RESOURCEMANAGER_STRICT=ON" "OGRE_RESOURCEMANAGER_STRICT=1" FEATURE_OPTIONS "${FEATURE_OPTIONS}")
string(REPLACE "OGRE_RESOURCEMANAGER_STRICT=OFF" "OGRE_RESOURCEMANAGER_STRICT=0" FEATURE_OPTIONS "${FEATURE_OPTIONS}")
@ -49,61 +65,75 @@ vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DOGRE_CFG_INSTALL_PATH=etc/${PORT}
-DOGRE_CMAKE_DIR=share/${PORT}
-DOGRE_MEDIA_PATH=share/${PORT}/Media
-DOGRE_PLUGINS_PATH=plugins/${PORT}
-DOGRE_BUILD_DEPENDENCIES=OFF
-DOGRE_BUILD_LIBS_AS_FRAMEWORKS=OFF
-DOGRE_BUILD_SAMPLES=OFF
-DOGRE_BUILD_TESTS=OFF
-DOGRE_BUILD_TOOLS=OFF
-DOGRE_BUILD_MSVC_MP=ON
-DOGRE_BUILD_MSVC_ZM=ON
-DOGRE_COPY_DEPENDENCIES=OFF
-DOGRE_ENABLE_PRECOMPILED_HEADERS=OFF
-DOGRE_INSTALL_DEPENDENCIES=OFF
-DOGRE_INSTALL_DOCS=OFF
-DOGRE_INSTALL_PDB=OFF
-DOGRE_INSTALL_SAMPLES=OFF
-DOGRE_INSTALL_TOOLS=OFF
-DOGRE_INSTALL_CMAKE=ON
-DOGRE_INSTALL_VSPROPS=OFF
-DOGRE_STATIC=${OGRE_STATIC}
-DOGRE_CONFIG_STATIC_LINK_CRT=${OGRE_CONFIG_STATIC_LINK_CRT}
-DOGRE_CONFIG_THREAD_PROVIDER=std
-DOGRE_BUILD_RENDERSYSTEM_D3D11=ON
-DOGRE_BUILD_RENDERSYSTEM_GL=ON
-DOGRE_BUILD_RENDERSYSTEM_GL3PLUS=ON
-DOGRE_BUILD_RENDERSYSTEM_GLES=OFF
-DOGRE_BUILD_RENDERSYSTEM_GLES2=OFF
-DFREETYPE_FOUND=ON
-DOGRE_CMAKE_DIR=share/ogre
-DCMAKE_REQUIRE_FIND_PACKAGE_ZLIB=ON
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
OPTIONS_DEBUG
-DOGRE_BUILD_TOOLS=OFF
-DOGRE_INSTALL_TOOLS=OFF
MAYBE_UNUSED_VARIABLES
CMAKE_REQUIRE_FIND_PACKAGE_OpenEXR
OGRE_COPY_DEPENDENCIES
OGRE_BUILD_MSVC_MP
OGRE_BUILD_MSVC_ZM
OGRE_BUILD_RENDERSYSTEM_GLES
OGRE_INSTALL_DEPENDENCIES
OGRE_INSTALL_VSPROPS
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup()
vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(GLOB REL_CFGS "${CURRENT_PACKAGES_DIR}/bin/*.cfg")
if(REL_CFGS)
file(COPY ${REL_CFGS} DESTINATION "${CURRENT_PACKAGES_DIR}/lib")
file(REMOVE ${REL_CFGS})
if(NOT VCPKG_BUILD_TYPE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/etc/${PORT}/resources.cfg" "=../../share" "=../../../share")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/OgreTargets-debug.cmake" "${_IMPORT_PREFIX}/plugins" "${_IMPORT_PREFIX}/debug/plugins")
endif()
file(GLOB DBG_CFGS "${CURRENT_PACKAGES_DIR}/debug/bin/*.cfg")
if(DBG_CFGS)
file(COPY ${DBG_CFGS} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib")
file(REMOVE ${DBG_CFGS})
endif()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/etc/ogre/samples.cfg"
"${CURRENT_PACKAGES_DIR}/debug/etc/ogre/samples.cfg"
"${CURRENT_PACKAGES_DIR}/debug/include"
"${CURRENT_PACKAGES_DIR}/debug/share"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
set(tools OgreMeshUpgrader OgreXMLConverter VRMLConverter)
if(OGRE_BUILD_PLUGIN_ASSIMP)
list(APPEND tools OgreAssimpConverter)
endif()
if(OGRE_BUILD_TOOLS)
vcpkg_copy_tools(TOOL_NAMES ${tools} AUTO_CLEAN)
endif()
#Remove OgreMain*.lib from lib/ folder, because autolink would complain, since it defines a main symbol
#manual-link subfolder is here to the rescue!
if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/lib/manual-link")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/OgreMain.lib" "${CURRENT_PACKAGES_DIR}/lib/manual-link/OgreMain.lib")
@ -127,10 +157,5 @@ if(VCPKG_TARGET_IS_WINDOWS)
endforeach()
endif()
file(GLOB share_cfgs "${CURRENT_PACKAGES_DIR}/share/OGRE/*.cfg")
foreach(file ${share_cfgs})
vcpkg_replace_string("${file}" "${CURRENT_PACKAGES_DIR}" "../..")
endforeach()
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

Просмотреть файл

@ -0,0 +1,19 @@
diff --git a/Components/Python/CMakeLists.txt b/Components/Python/CMakeLists.txt
index b6062c6..df955e3 100644
--- a/Components/Python/CMakeLists.txt
+++ b/Components/Python/CMakeLists.txt
@@ -22,7 +22,14 @@ if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)
list(APPEND CMAKE_SWIG_FLAGS -DHAVE_IMGUI -DIMGUI_DISABLE_OBSOLETE_FUNCTIONS)
endif()
+# cf. https://github.com/swig/swig/pull/1587
+file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/pyobject_gc_polyfill.h" CONTENT [[
+#define _PyObject_GC_UNTRACK(x) PyObject_GC_UnTrack(x)
+]])
macro(ogre_python_module target)
+ if(SWIG_FOUND AND SWIG_VERSION VERSION_LESS "4.0.1" AND Python3_VERSION VERSION_GREATER_EQUAL "3.8")
+ target_precompile_headers(${SWIG_MODULE_${target}_REAL_NAME} PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/pyobject_gc_polyfill.h")
+ endif()
set_target_properties(${SWIG_MODULE_${target}_REAL_NAME} PROPERTIES
DEBUG_POSTFIX "")
install(TARGETS ${SWIG_MODULE_${target}_REAL_NAME} LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES})

Просмотреть файл

@ -1,265 +0,0 @@
diff --git a/CMake/CMakeLists.txt b/CMake/CMakeLists.txt
index a7a3796..2e21403 100644
--- a/CMake/CMakeLists.txt
+++ b/CMake/CMakeLists.txt
@@ -13,10 +13,12 @@
# directory, but can also be used for custom projects.
#############################################################
-if(WIN32 OR APPLE)
- set(OGRE_CMAKE_DIR "CMake")
-else()
- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+if(NOT DEFINED OGRE_CMAKE_DIR)
+ if(WIN32 OR APPLE)
+ set(OGRE_CMAKE_DIR "CMake")
+ else()
+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+ endif()
endif()
set(INST_FILES Utils/FindPkgMacros.cmake)
diff --git a/CMake/InstallResources.cmake b/CMake/InstallResources.cmake
index 06a055b..09d10bd 100644
--- a/CMake/InstallResources.cmake
+++ b/CMake/InstallResources.cmake
@@ -204,10 +204,12 @@ endif ()
# Create the CMake package files
include(CMakePackageConfigHelpers)
-if(WIN32 OR APPLE)
- set(OGRE_CMAKE_DIR "CMake")
-else()
- set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+if(NOT DEFINED OGRE_CMAKE_DIR)
+ if(WIN32 OR APPLE)
+ set(OGRE_CMAKE_DIR "CMake")
+ else()
+ set(OGRE_CMAKE_DIR "${OGRE_LIB_DIRECTORY}/OGRE/cmake")
+ endif()
endif()
if(WIN32)
set(OGRE_PLUGIN_DIR_CMAKE "bin")
diff --git a/CMake/Packages/FindCg.cmake b/CMake/Packages/FindCg.cmake
index 4501cf9..7eb57c3 100644
--- a/CMake/Packages/FindCg.cmake
+++ b/CMake/Packages/FindCg.cmake
@@ -56,7 +56,7 @@ endif()
find_library(Cg_LIBRARY_REL NAMES ${Cg_LIBRARY_NAMES} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
find_library(Cg_LIBRARY_DBG NAMES ${Cg_LIBRARY_NAMES_DBG} HINTS ${Cg_LIB_SEARCH_PATH} ${Cg_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-make_library_set(Cg_LIBRARY)
+make_library_set(Cg)
if (WIN32)
if (CMAKE_CL_64)
diff --git a/CMake/Packages/FindFreeImage.cmake b/CMake/Packages/FindFreeImage.cmake
index 7c89ec5..d8314f0 100644
--- a/CMake/Packages/FindFreeImage.cmake
+++ b/CMake/Packages/FindFreeImage.cmake
@@ -43,7 +43,7 @@ find_path(FreeImage_INCLUDE_DIR NAMES FreeImage.h HINTS ${FreeImage_INC_SEARCH_P
find_library(FreeImage_LIBRARY_REL NAMES ${FreeImage_LIBRARY_NAMES} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
find_library(FreeImage_LIBRARY_DBG NAMES ${FreeImage_LIBRARY_NAMES_DBG} HINTS ${FreeImage_LIB_SEARCH_PATH} ${FreeImage_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-make_library_set(FreeImage_LIBRARY)
+make_library_set(FreeImage)
findpkg_finish(FreeImage)
diff --git a/CMake/Packages/FindGLSLOptimizer.cmake b/CMake/Packages/FindGLSLOptimizer.cmake
index dd4b179..6f158fc 100644
--- a/CMake/Packages/FindGLSLOptimizer.cmake
+++ b/CMake/Packages/FindGLSLOptimizer.cmake
@@ -38,7 +38,7 @@ findpkg_framework(GLSL_Optimizer)
find_path(GLSL_Optimizer_INCLUDE_DIR NAMES glsl_optimizer.h HINTS ${GLSL_Optimizer_INC_SEARCH_PATH} ${GLSL_Optimizer_PKGC_INCLUDE_DIRS} PATH_SUFFIXES GLSL_Optimizer)
find_library(GLSL_Optimizer_LIBRARY_REL NAMES ${GLSL_Optimizer_LIBRARY_NAMES} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
find_library(GLSL_Optimizer_LIBRARY_DBG NAMES ${GLSL_Optimizer_LIBRARY_NAMES_DBG} HINTS ${GLSL_Optimizer_LIB_SEARCH_PATH} ${GLSL_Optimizer_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-make_library_set(GLSL_Optimizer_LIBRARY)
+make_library_set(GLSL_Optimizer)
findpkg_finish(GLSL_Optimizer)
add_parent_dir(GLSL_Optimizer_INCLUDE_DIRS GLSL_Optimizer_INCLUDE_DIR)
diff --git a/CMake/Packages/FindHLSL2GLSL.cmake b/CMake/Packages/FindHLSL2GLSL.cmake
index 7125895..13a306f 100644
--- a/CMake/Packages/FindHLSL2GLSL.cmake
+++ b/CMake/Packages/FindHLSL2GLSL.cmake
@@ -38,7 +38,7 @@ findpkg_framework(HLSL2GLSL)
find_path(HLSL2GLSL_INCLUDE_DIR NAMES hlsl2glsl.h HINTS ${HLSL2GLSL_INC_SEARCH_PATH} ${HLSL2GLSL_PKGC_INCLUDE_DIRS} PATH_SUFFIXES HLSL2GLSL)
find_library(HLSL2GLSL_LIBRARY_REL NAMES ${HLSL2GLSL_LIBRARY_NAMES} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
find_library(HLSL2GLSL_LIBRARY_DBG NAMES ${HLSL2GLSL_LIBRARY_NAMES_DBG} HINTS ${HLSL2GLSL_LIB_SEARCH_PATH} ${HLSL2GLSL_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-make_library_set(HLSL2GLSL_LIBRARY)
+make_library_set(HLSL2GLSL)
findpkg_finish(HLSL2GLSL)
add_parent_dir(HLSL2GLSL_INCLUDE_DIRS HLSL2GLSL_INCLUDE_DIR)
diff --git a/CMake/Packages/FindNVAPI.cmake b/CMake/Packages/FindNVAPI.cmake
index 95c70cd..893ce01 100644
--- a/CMake/Packages/FindNVAPI.cmake
+++ b/CMake/Packages/FindNVAPI.cmake
@@ -44,7 +44,7 @@ findpkg_framework(NVAPI)
find_path(NVAPI_INCLUDE_DIR NAMES nvapi.h HINTS ${NVAPI_FRAMEWORK_INCLUDES} ${NVAPI_INC_SEARCH_PATH} ${NVAPI_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NVAPI)
find_library(NVAPI_LIBRARY_REL NAMES ${NVAPI_LIBRARY_NAMES} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" release relwithdebinfo minsizerel)
find_library(NVAPI_LIBRARY_DBG NAMES ${NVAPI_LIBRARY_NAMES_DBG} HINTS ${NVAPI_LIB_SEARCH_PATH} ${NVAPI_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" debug)
-make_library_set(NVAPI_LIBRARY)
+make_library_set(NVAPI)
findpkg_finish(NVAPI)
add_parent_dir(NVAPI_INCLUDE_DIRS NVAPI_INCLUDE_DIR)
\ No newline at end of file
diff --git a/CMake/Packages/FindPOCO.cmake b/CMake/Packages/FindPOCO.cmake
index 6b6d7fa..3667b8b 100644
--- a/CMake/Packages/FindPOCO.cmake
+++ b/CMake/Packages/FindPOCO.cmake
@@ -50,7 +50,7 @@ findpkg_framework(POCO)
find_path(POCO_INCLUDE_DIR NAMES Poco/Foundation.h HINTS ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Foundation/include)
find_library(POCO_LIBRARY_REL NAMES ${POCO_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
find_library(POCO_LIBRARY_DBG NAMES ${POCO_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
-make_library_set(POCO_LIBRARY)
+make_library_set(POCO)
findpkg_finish(POCO)
@@ -66,7 +66,7 @@ get_debug_names(POCO_Util_LIBRARY_NAMES)
find_path(POCO_Util_INCLUDE_DIR NAMES Poco/Util/Util.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Util/include)
find_library(POCO_Util_LIBRARY_REL NAMES ${POCO_Util_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
find_library(POCO_Util_LIBRARY_DBG NAMES ${POCO_Util_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
-make_library_set(POCO_Util_LIBRARY)
+make_library_set(POCO_Util)
findpkg_finish(POCO_Util)
# Look for Poco's Net package
@@ -76,7 +76,7 @@ get_debug_names(POCO_Net_LIBRARY_NAMES)
find_path(POCO_Net_INCLUDE_DIR NAMES Poco/Net/Net.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES Net/include)
find_library(POCO_Net_LIBRARY_REL NAMES ${POCO_Net_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
find_library(POCO_Net_LIBRARY_DBG NAMES ${POCO_Net_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
-make_library_set(POCO_Net_LIBRARY)
+make_library_set(POCO_Net)
findpkg_finish(POCO_Net)
# Look for Poco's NetSSL package
@@ -86,7 +86,7 @@ get_debug_names(POCO_NetSSL_LIBRARY_NAMES)
find_path(POCO_NetSSL_INCLUDE_DIR NAMES Poco/Net/NetSSL.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES NetSSL/include)
find_library(POCO_NetSSL_LIBRARY_REL NAMES ${POCO_NetSSL_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
find_library(POCO_NetSSL_LIBRARY_DBG NAMES ${POCO_NetSSL_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
-make_library_set(POCO_NetSSL_LIBRARY)
+make_library_set(POCO_NetSSL)
findpkg_finish(POCO_NetSSL)
# Look for Poco's XML package
@@ -96,6 +96,6 @@ get_debug_names(POCO_XML_LIBRARY_NAMES)
find_path(POCO_XML_INCLUDE_DIR NAMES Poco/XML/XML.h HINTS ${POCO_INCLUDE_DIR} ${POCO_INC_SEARCH_PATH} ${POCO_PKGC_INCLUDE_DIRS} PATH_SUFFIXES XML/include)
find_library(POCO_XML_LIBRARY_REL NAMES ${POCO_XML_LIBRARY_NAMES} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
find_library(POCO_XML_LIBRARY_DBG NAMES ${POCO_XML_LIBRARY_NAMES_DBG} HINTS ${POCO_LIB_SEARCH_PATH} ${POCO_PKGC_LIBRARY_DIRS} PATH_SUFFIXES Linux/i686)
-make_library_set(POCO_XML_LIBRARY)
+make_library_set(POCO_XML)
findpkg_finish(POCO_XML)
diff --git a/CMake/Packages/FindTBB.cmake b/CMake/Packages/FindTBB.cmake
index 0c48510..c121966 100644
--- a/CMake/Packages/FindTBB.cmake
+++ b/CMake/Packages/FindTBB.cmake
@@ -104,7 +104,7 @@ findpkg_framework(TBB)
find_path(TBB_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS})
find_library(TBB_LIBRARY_REL NAMES ${TBB_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
find_library(TBB_LIBRARY_DBG NAMES ${TBB_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
-make_library_set(TBB_LIBRARY)
+make_library_set(TBB)
findpkg_finish(TBB)
@@ -120,7 +120,7 @@ get_debug_names(TBB_MALLOC_LIBRARY_NAMES)
find_path(TBB_MALLOC_INCLUDE_DIR NAMES tbb/tbb.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS} )
find_library(TBB_MALLOC_LIBRARY_REL NAMES ${TBB_MALLOC_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} )
find_library(TBB_MALLOC_LIBRARY_DBG NAMES ${TBB_MALLOC_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS} )
-make_library_set(TBB_MALLOC_LIBRARY)
+make_library_set(TBB_MALLOC)
findpkg_finish(TBB_MALLOC)
# Look for TBB's malloc proxy package
@@ -130,5 +130,5 @@ get_debug_names(TBB_MALLOC_PROXY_LIBRARY_NAMES)
find_path(TBB_MALLOC_PROXY_INCLUDE_DIR NAMES tbb/tbbmalloc_proxy.h HINTS ${TBB_INCLUDE_DIR} ${TBB_INC_SEARCH_PATH} ${TBB_PKGC_INCLUDE_DIRS})
find_library(TBB_MALLOC_PROXY_LIBRARY_REL NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
find_library(TBB_MALLOC_PROXY_LIBRARY_DBG NAMES ${TBB_MALLOC_PROXY_LIBRARY_NAMES_DBG} HINTS ${TBB_LIB_SEARCH_PATH} ${TBB_PKGC_LIBRARY_DIRS})
-make_library_set(TBB_MALLOC_PROXY_LIBRARY)
+make_library_set(TBB_MALLOC_PROXY)
findpkg_finish(TBB_MALLOC_PROXY)
diff --git a/CMake/Packages/FindZZip.cmake b/CMake/Packages/FindZZip.cmake
index e97951e..54c2567 100644
--- a/CMake/Packages/FindZZip.cmake
+++ b/CMake/Packages/FindZZip.cmake
@@ -39,12 +39,12 @@ use_pkgconfig(ZZip_PKGC zziplib)
findpkg_framework(ZZip)
-find_path(ZZip_INCLUDE_DIR NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS})
+find_path(ZZip_INCLUDE_DIRS NAMES zzip/zzip.h HINTS ${ZZip_INC_SEARCH_PATH} ${ZZip_PKGC_INCLUDE_DIRS})
find_library(ZZip_LIBRARY_REL NAMES ${ZZip_LIBRARY_NAMES} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Release RelWithDebInfo MinSizeRel)
find_library(ZZip_LIBRARY_DBG NAMES ${ZZip_LIBRARY_NAMES_DBG} HINTS ${ZZip_LIB_SEARCH_PATH} ${ZZip_PKGC_LIBRARY_DIRS} PATH_SUFFIXES "" Debug)
-make_library_set(ZZip_LIBRARY)
+make_library_set(ZZip)
findpkg_finish(ZZip)
diff --git a/CMake/Utils/FindPkgMacros.cmake b/CMake/Utils/FindPkgMacros.cmake
index 374f84b..dc7066d 100644
--- a/CMake/Utils/FindPkgMacros.cmake
+++ b/CMake/Utils/FindPkgMacros.cmake
@@ -79,15 +79,21 @@ endmacro (use_pkgconfig)
# Couple a set of release AND debug libraries (or frameworks)
macro(make_library_set PREFIX)
- if (${PREFIX}_FWK)
- set(${PREFIX} ${${PREFIX}_FWK})
- elseif (${PREFIX}_REL AND ${PREFIX}_DBG)
- set(${PREFIX} optimized ${${PREFIX}_REL} debug ${${PREFIX}_DBG})
- elseif (${PREFIX}_REL)
- set(${PREFIX} ${${PREFIX}_REL})
- elseif (${PREFIX}_DBG)
- set(${PREFIX} ${${PREFIX}_DBG})
- endif ()
+ include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
+ set(PREFIX_LIB "${PREFIX}_LIBRARY")
+ if (${PREFIX_LIB}_FWK)
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_FWK})
+ elseif (${PREFIX_LIB}_REL AND ${PREFIX_LIB}_DBG)
+ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL} CACHE STRING "")
+ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG} CACHE STRING "")
+ select_library_configurations(${PREFIX})
+ elseif (${PREFIX_LIB}_REL)
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_REL})
+ set(${PREFIX_LIB}_RELEASE ${${PREFIX_LIB}_REL})
+ elseif (${PREFIX_LIB}_DBG)
+ set(${PREFIX_LIB} ${${PREFIX_LIB}_DBG})
+ set(${PREFIX_LIB}_DEBUG ${${PREFIX_LIB}_DBG})
+ endif()
endmacro(make_library_set)
# Generate debug names from given release names
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1602572..9fddbe7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -271,7 +271,7 @@ elseif(EMSCRIPTEN)
elseif (APPLE AND NOT APPLE_IOS)
set(XCODE_ATTRIBUTE_SDKROOT macosx)
- if(CMAKE_GENERATOR STREQUAL "Unix Makefiles")
+ if(1)
execute_process(COMMAND xcodebuild -version -sdk "${XCODE_ATTRIBUTE_SDKROOT}" Path | head -n 1 OUTPUT_VARIABLE CMAKE_OSX_SYSROOT)
string(REGEX REPLACE "(\r?\n)+$" "" CMAKE_OSX_SYSROOT "${CMAKE_OSX_SYSROOT}")
else()
diff --git a/PlugIns/EXRCodec/CMakeLists.txt b/PlugIns/EXRCodec/CMakeLists.txt
index e9c936a..bb8747e 100644
--- a/PlugIns/EXRCodec/CMakeLists.txt
+++ b/PlugIns/EXRCodec/CMakeLists.txt
@@ -16,7 +16,7 @@ target_link_libraries(Codec_EXR OgreMain ${OPENEXR_LIBRARIES})
target_include_directories(Codec_EXR PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
$<INSTALL_INTERFACE:include/OGRE/Plugins/EXRCodec>)
-target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}/OpenEXR")
+target_include_directories(Codec_EXR SYSTEM PRIVATE "${OPENEXR_INCLUDE_DIR}")
ogre_config_framework(Codec_EXR)
ogre_config_plugin(Codec_EXR)

Просмотреть файл

@ -1,14 +1,16 @@
{
"name": "ogre",
"version": "1.12.9",
"port-version": 10,
"version": "13.4.4",
"description": "3D Object-Oriented Graphics Rendering Engine",
"homepage": "https://github.com/OGRECave/ogre",
"license": "MIT",
"dependencies": [
"assimp",
"pugixml",
"sdl2",
{
"name": "sdl2",
"platform": "!android"
},
"stb",
{
"name": "vcpkg-cmake",
"host": true
@ -23,31 +25,49 @@
"assimp",
"freeimage",
"overlay",
"zziplib"
"zip"
],
"features": {
"assimp": {
"description": "Deprecate feature, enable by default"
"description": "Build with assimp support",
"dependencies": [
"assimp"
]
},
"csharp": {
"description": "Build csharp bindings"
"description": "Build csharp bindings",
"supports": "!static & !android & !ios & !emscripten"
},
"d3d9": {
"description": "Build Direct3D9 RenderSystem"
"description": "Build Direct3D9 RenderSystem",
"supports": "windows"
},
"freeimage": {
"description": "Build with FreeImage support",
"description": "Build with FreeImage support (no effect for Emscripten)",
"dependencies": [
"freeimage"
{
"name": "freeimage",
"platform": "!emscripten"
}
]
},
"java": {
"description": "Build Java (JNI) bindings"
"description": "Build Java (JNI) bindings",
"supports": "!static & !android & !ios & !emscripten"
},
"openexr": {
"description": "Build with OpenEXR support",
"dependencies": [
"openexr"
]
},
"overlay": {
"description": "Build overlay component",
"dependencies": [
"freetype",
{
"name": "freetype",
"default-features": false
},
{
"name": "imgui",
"features": [
@ -58,6 +78,7 @@
},
"python": {
"description": "Build Python bindings",
"supports": "!static & !android & !ios & !emscripten",
"dependencies": [
"python3"
]
@ -65,10 +86,23 @@
"strict": {
"description": "Force Ogre resource manager to be strict with group names and resource names"
},
"tools": {
"description": "Build tools",
"supports": "!android & !emscripten"
},
"zip": {
"description": "Build ZIP archive support"
},
"zziplib": {
"description": "Build with zziplib support (GPL)",
"description": "Obsolete, use zip feature instead",
"dependencies": [
"zziplib"
{
"name": "ogre",
"default-features": false,
"features": [
"zip"
]
}
]
}
}

Просмотреть файл

@ -729,7 +729,6 @@ ogdf:x64-windows-static-md=skip
ogdf:x86-windows = skip
# broken when `python` is python3, https://github.com/microsoft/vcpkg/issues/18936
ogdf:x64-linux=fail
ogre:x64-osx=fail
ogre:arm64-osx=fail
# Conflicts with ogre
ogre-next:arm64-windows = skip

Просмотреть файл

@ -5281,8 +5281,8 @@
"port-version": 2
},
"ogre": {
"baseline": "1.12.9",
"port-version": 10
"baseline": "13.4.4",
"port-version": 0
},
"ogre-next": {
"baseline": "2.3.1",

Просмотреть файл

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "558eff8cc61b6d9a5638bf10e6e4ade7ad178ee7",
"version": "13.4.4",
"port-version": 0
},
{
"git-tree": "ea03f2d3fd45123a688cd9fb177bcb9bab30a795",
"version": "1.12.9",