Skip to content

Commit

Permalink
ogre: bump to v14.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Sep 23, 2024
1 parent c4293da commit 98faa3e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions recipes/ogre/1.x/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sources:
"14.2.6":
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v14.2.6.tar.gz"
sha256: "32437f6a90414332afaf6ac7e45633c035d07e1760f81e6419e2cb1bb79b4c12"
"14.3.0":
url: "https://github.com/OGRECave/ogre/archive/refs/tags/v14.3.0.tar.gz"
sha256: "40c20797f4c21bae0d80df7ffd6fe92af26c0cdd666c2db4f005da02dfcc4d5b"
22 changes: 11 additions & 11 deletions recipes/ogre/1.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def export_sources(self):

@property
def _build_opengl(self):
# https://github.com/OGRECave/ogre/blob/v14.2.6/RenderSystems/CMakeLists.txt#L32-L34
# https://github.com/OGRECave/ogre/blob/v14.3.0/RenderSystems/CMakeLists.txt#L32-L34
return (self.options.get_safe("build_rendersystem_gl") or
self.options.get_safe("build_rendersystem_gles2") or
self.options.get_safe("build_rendersystem_gl3plus"))
Expand Down Expand Up @@ -290,7 +290,7 @@ def validate(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, 11)

# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/ConfigureBuild.cmake#L21-L25
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/ConfigureBuild.cmake#L21-L25
if self.options.shared and is_apple_os(self) and self.settings.os != "Macos":
raise ConanInvalidConfiguration(f"OGRE shared library is not available on {self.settings.os}")

Expand All @@ -315,7 +315,7 @@ def _include_dir(self):

@property
def _plugins_dir(self):
# Match https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/InstallResources.cmake#L33-L43
# Match https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/InstallResources.cmake#L33-L43
return "lib" if self.settings.os == "Windows" else os.path.join("lib", "OGRE")

@property
Expand All @@ -335,7 +335,7 @@ def generate(self):
venv.generate()

tc = CMakeToolchain(self)
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMakeLists.txt#L281-L420
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMakeLists.txt#L281-L420
tc.variables["OGRE_STATIC"] = not self.options.shared
tc.variables["OGRE_RESOURCEMANAGER_STRICT"] = 2 if self.options.resourcemanager_strict == "STRICT" else 1
tc.variables["OGRE_BUILD_RENDERSYSTEM_D3D9"] = self.options.get_safe("build_rendersystem_d3d9", False)
Expand Down Expand Up @@ -403,10 +403,10 @@ def generate(self):
tc.variables["OGRE_LIB_DIRECTORY"] = "lib"
tc.variables["OGRE_BIN_DIRECTORY"] = "bin"
tc.variables["OGRE_INSTALL_VSPROPS"] = False
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/ConfigureBuild.cmake#L63-L69
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/ConfigureBuild.cmake#L63-L69
tc.variables["OGRE_ASSERT_MODE"] = self.options.assert_mode
tc.variables["OGRE_BUILD_DEPENDENCIES"] = False
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/InstallResources.cmake
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/InstallResources.cmake
tc.variables["OGRE_PLUGINS_PATH"] = self._to_cmake_path(self._plugins_dir)
tc.variables["OGRE_MEDIA_PATH"] = self._to_cmake_path(self._media_dir)
tc.variables["OGRE_CFG_INSTALL_PATH"] = self._to_cmake_path(self._config_dir)
Expand Down Expand Up @@ -439,7 +439,7 @@ def _patch_sources(self):
replace_in_file(self, os.path.join(self.source_folder, "PlugIns", "STBICodec", "src", "OgreSTBICodec.cpp"),
'#include "stbi/', '#include "')
# Unvendor imgui in Overlay
# https://github.com/OGRECave/ogre/blob/v14.2.6/Components/Overlay/CMakeLists.txt#L21-L43
# https://github.com/OGRECave/ogre/blob/v14.3.0/Components/Overlay/CMakeLists.txt#L21-L43
if self.options.get_safe("build_component_overlay_imgui"):
replace_in_file(self, os.path.join(self.source_folder, "Components", "Overlay", "CMakeLists.txt"),
"if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)", "if(0)")
Expand All @@ -457,7 +457,7 @@ def _ogre_cmake_packages(self):
return ["DirectX", "DirectX11", "Softimage", "GLSLOptimizer", "HLSL2GLSL"]

def _create_cmake_module_variables(self, module_file):
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/Templates/OGREConfig.cmake.in
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/Templates/OGREConfig.cmake.in
content = textwrap.dedent(f"""\
set(OGRE_STATIC {'OFF' if self.options.shared else 'ON'})
get_filename_component(OGRE_PREFIX_DIR "${{CMAKE_CURRENT_LIST_DIR}}/../../../" ABSOLUTE)
Expand Down Expand Up @@ -521,7 +521,7 @@ def _shared_extension(self):
return ".so"

def _core_libname(self, lib):
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/ConfigureBuild.cmake#L140-L145
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/ConfigureBuild.cmake#L140-L145
if not self.options.shared:
lib += "Static"
if self.settings.os == "Windows" and self.settings.build_type == "Debug":
Expand Down Expand Up @@ -641,13 +641,13 @@ def _add_plugin_component(comp, *, requires=None):

if self.options.get_safe("build_rendersystem_d3d9"):
_add_plugin_component("RenderSystem_Direct3D9")
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/Packages/FindDirectX.cmake#L58-L60
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/Packages/FindDirectX.cmake#L58-L60
self.cpp_info.components["RenderSystem_Direct3D9"].system_libs += ["d3d9", "d3dx9", "dxguid"]
if self.options.get_safe("build_rendersystem_d3d11"):
_add_plugin_component("RenderSystem_Direct3D11")
if self.settings.compiler == "gcc":
self.cpp_info.components["RenderSystem_Direct3D11"].system_libs += ["psapi", "d3dcompiler"]
# https://github.com/OGRECave/ogre/blob/v14.2.6/CMake/Packages/FindDirectX11.cmake#L95-L100
# https://github.com/OGRECave/ogre/blob/v14.3.0/CMake/Packages/FindDirectX11.cmake#L95-L100
self.cpp_info.components["RenderSystem_Direct3D11"].system_libs += ["dxerr", "dxguid", "dxgi", "d3dcompiler", "d3d11", "d3dx11"]
if self.options.get_safe("build_rendersystem_gl"):
_add_plugin_component("RenderSystem_GL", requires=opengl_reqs)
Expand Down
2 changes: 1 addition & 1 deletion recipes/ogre/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
versions:
"14.2.6":
"14.3.0":
folder: 1.x

0 comments on commit 98faa3e

Please sign in to comment.