🔨 Reduce amount of patches for OGRE 1.12
This commit is contained in:
parent
8be318a630
commit
fafacf76f3
@ -5,7 +5,7 @@ sources:
|
||||
patches:
|
||||
"1.12.13":
|
||||
- patch_file: "patches/1.12.13/CMakeLists.txt.patch"
|
||||
- patch_file: "patches/1.12.13/AddLibPNG.patch"
|
||||
- patch_file: "patches/1.12.13/FixFindOpenGLES2.cmake.patch"
|
||||
- patch_file: "patches/1.12.13/pugixml-fix.patch"
|
||||
- patch_file: "patches/1.12.13/FindPkgMacros.cmake.patch"
|
||||
requirements:
|
||||
|
@ -8,6 +8,12 @@ class OGREConan(ConanFile):
|
||||
url = "https://github.com/AnotherFoxGuy/conan-OGRE"
|
||||
description = "scene-oriented, flexible 3D engine written in C++"
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
options = {
|
||||
"resourcemanager_strict": [0, 1, 2]
|
||||
}
|
||||
default_options = {
|
||||
"resourcemanager_strict": 0
|
||||
}
|
||||
generators = "cmake_paths", "cmake_find_package"
|
||||
exports_sources = "patches/**"
|
||||
|
||||
@ -34,13 +40,13 @@ class OGREConan(ConanFile):
|
||||
cmake.definitions["OGRE_BUILD_COMPONENT_CSHARP"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_COMPONENT_JAVA"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_COMPONENT_PYTHON"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_PLUGIN_STBI"] = "ON"
|
||||
cmake.definitions["OGRE_BUILD_COMPONENT_BITES"] = "ON"
|
||||
cmake.definitions["OGRE_BUILD_SAMPLES"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D9"] = "ON"
|
||||
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_D3D11"] = "ON"
|
||||
cmake.definitions["OGRE_BUILD_RENDERSYSTEM_GL3PLUS"] = "OFF"
|
||||
cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = 0
|
||||
cmake.definitions["OGRE_RESOURCEMANAGER_STRICT"] = self.options.resourcemanager_strict
|
||||
cmake.definitions["OGRE_INSTALL_SAMPLES"] = "OFF"
|
||||
cmake.definitions["OGRE_BUILD_PLUGIN_DOT_SCENE"] = "OFF"
|
||||
if os_info.is_windows:
|
||||
|
@ -1,32 +0,0 @@
|
||||
--- Components/Overlay/CMakeLists.txt
|
||||
+++ Components/Overlay/CMakeLists.txt
|
||||
@@ -11,6 +11,20 @@
|
||||
# Overlay optional component
|
||||
############################################################
|
||||
|
||||
+# FreeType from conan has seperate libraries
|
||||
+find_package(PNG)
|
||||
+find_package(BZip2)
|
||||
+
|
||||
+find_library(BROTLICOMMON_LIBRARY NAMES brotlicommon brotlicommon-static)
|
||||
+find_library(BROTLIDEC_LIBRARY NAMES brotlidec brotlidec-static)
|
||||
+
|
||||
+if(NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLICOMMON_LIBRARY-NOTFOUND" AND NOT ${BROTLIDEC_LIBRARY} STREQUAL "BROTLIDEC_LIBRARY-NOTFOUND")
|
||||
+ set(BROTLI_LIBRARIES ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY})
|
||||
+ message(STATUS "Brotli libraries found: ${BROTLI_LIBRARIES}")
|
||||
+else()
|
||||
+ message(WARNING "Brotli library not found: ${BROTLICOMMON_LIBRARY} ${BROTLIDEC_LIBRARY}")
|
||||
+endif()
|
||||
+
|
||||
# define header and source files for the library
|
||||
file(GLOB HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
|
||||
list(APPEND HEADER_FILES
|
||||
@@ -41,7 +55,7 @@
|
||||
# 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)
|
||||
+target_link_libraries(OgreOverlay PUBLIC OgreMain PRIVATE Freetype::Freetype ${PNG_LIBRARIES} ${BZIP2_LIBRARIES} ${BROTLI_LIBRARIES} ZLIB::ZLIB)
|
||||
target_include_directories(OgreOverlay PUBLIC
|
||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||
$<INSTALL_INTERFACE:include/OGRE/Overlay>
|
@ -9,11 +9,11 @@
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL "Tegra-Android")
|
||||
set(CMAKE_LINK_LIBRARY_FLAG "")
|
||||
endif()
|
||||
@@ -74,6 +76,7 @@
|
||||
@@ -71,6 +71,7 @@
|
||||
|
||||
# Include necessary submodules
|
||||
set(CMAKE_MODULE_PATH
|
||||
+ "${CMAKE_BINARY_DIR}"
|
||||
"${PROJECT_SOURCE_DIR}/CMake"
|
||||
"${PROJECT_SOURCE_DIR}/CMake/Utils"
|
||||
"${PROJECT_SOURCE_DIR}/CMake/Packages"
|
||||
+ "${CMAKE_BINARY_DIR}"
|
||||
)
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
11
ogre/1.12/patches/1.12.13/FixFindOpenGLES2.cmake.patch
Normal file
11
ogre/1.12/patches/1.12.13/FixFindOpenGLES2.cmake.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- CMake/Packages/FindOpenGLES2.cmake
|
||||
+++ CMake/Packages/FindOpenGLES2.cmake
|
||||
@@ -23,6 +23,8 @@
|
||||
# EGL_INCLUDE_DIR - the EGL include directory
|
||||
# EGL_LIBRARIES - Link these to use EGL
|
||||
|
||||
+include(FindPkgMacros)
|
||||
+
|
||||
IF(APPLE)
|
||||
create_search_paths(/Developer/Platforms)
|
||||
findpkg_framework(OpenGLES2)
|
Loading…
x
Reference in New Issue
Block a user