From ac8d25468a89016fced2da3f1e4586e53791face Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Sat, 12 Oct 2024 10:23:02 +0300 Subject: [PATCH] ogre: DirectX 9 is not available on C3I --- recipes/ogre/1.x/conanfile.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/recipes/ogre/1.x/conanfile.py b/recipes/ogre/1.x/conanfile.py index a5aaf497a287a..f2452afe2e9c5 100644 --- a/recipes/ogre/1.x/conanfile.py +++ b/recipes/ogre/1.x/conanfile.py @@ -83,7 +83,7 @@ class OgreConanFile(ConanFile): "shared": False, "fPIC": True, "resourcemanager_strict": "STRICT", - "build_rendersystem_d3d9": True, + "build_rendersystem_d3d9": False, "build_rendersystem_d3d11": True, "build_rendersystem_gl3plus": True, "build_rendersystem_gl": True, @@ -475,6 +475,14 @@ def _patch_sources(self): "if(OGRE_BUILD_COMPONENT_OVERLAY_IMGUI)", "if(0)") replace_in_file(self, os.path.join(self.source_folder, "Components", "Overlay", "CMakeLists.txt"), "list(REMOVE_ITEM SOURCE_FILES", "# list(REMOVE_ITEM SOURCE_FILES") + # Require DirectX if enabled + if self.options.get_safe("build_rendersystem_d3d9"): + replace_in_file(self, os.path.join(self.source_folder, "CMake", "Dependencies.cmake"), + "find_package(DirectX)", "find_package(DirectX REQUIRED)") + if self.options.get_safe("build_rendersystem_d3d11"): + replace_in_file(self, os.path.join(self.source_folder, "CMake", "Dependencies.cmake"), + "find_package(DirectX11)", "find_package(DirectX11 REQUIRED)") + def build(self): self._patch_sources()