From 32d2aa35a867ef77c2b9ba77322a82184d540e4e Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Thu, 16 Sep 2021 16:13:51 +0200 Subject: [PATCH] Avoid configure warning when checking ogre-1.10 (#411) * Avoid warning on missing components when detecting ogre 1.10 Signed-off-by: Jose Luis Rivero --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9c01cf54..6c4a69231 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,13 +65,17 @@ list(APPEND ign_ogre_components "RTShaderSystem" "Terrain" "Overlay") # Display a warning for the users on this setup unless they provide # USE_UNOFFICAL_OGRE_VERSIONS flag if (NOT USE_UNOFFICAL_OGRE_VERSIONS) - ign_find_package(IgnOGRE VERSION 1.10 - COMPONENTS ${ign_ogre_components}) + # Only for checking the ogre version + ign_find_package(IgnOGRE VERSION 1.10 QUIET) if (OGRE_FOUND) IGN_BUILD_WARNING("Ogre 1.x versions greater than 1.9 are not officially supported." "The software might compile and even work but support from upstream" "could be reduced to accepting patches for newer versions") + ign_find_package(IgnOGRE VERSION 1.10 + COMPONENTS ${ign_ogre_components} + REQUIRED_BY ogre + PRIVATE_FOR ogre) else() # If ogre 1.10 or greater was not found, then proceed to look for 1.9.x # versions which are offically supported