From 4831fd42bd2effdf1843c9d47c5f1cea843eca93 Mon Sep 17 00:00:00 2001 From: Martin Valgur Date: Mon, 23 Sep 2024 10:19:02 +0300 Subject: [PATCH] imgui: fix disabling of imgui --- recipes/ogre/1.x/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/ogre/1.x/conanfile.py b/recipes/ogre/1.x/conanfile.py index c5010d626f9dc1..4ce70b9d382fda 100644 --- a/recipes/ogre/1.x/conanfile.py +++ b/recipes/ogre/1.x/conanfile.py @@ -437,10 +437,11 @@ def _patch_sources(self): '#include "stbi/', '#include "') # Unvendor imgui in Overlay # https://github.com/OGRECave/ogre/blob/v14.2.6/Components/Overlay/CMakeLists.txt#L21-L43 - replace_in_file(self, os.path.join(self.source_folder, "Components", "Overlay", "CMakeLists.txt"), - "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") + 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)") + replace_in_file(self, os.path.join(self.source_folder, "Components", "Overlay", "CMakeLists.txt"), + "list(REMOVE_ITEM SOURCE_FILES", "# list(REMOVE_ITEM SOURCE_FILES") def build(self): self._patch_sources()