Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic on warning for ogre versions different than 1.9.x #465

Merged
merged 3 commits into from Oct 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 8 additions & 17 deletions CMakeLists.txt
Expand Up @@ -61,28 +61,19 @@ endif()
# Find OGRE
list(APPEND ign_ogre_components "RTShaderSystem" "Terrain" "Overlay")

# Ogre versions greater than 1.9 are not officialy supported.
ign_find_package(IgnOGRE VERSION 1.9.0
COMPONENTS ${ign_ogre_components}
REQUIRED_BY ogre
PRIVATE_FOR ogre)

# Ogre versions different than 1.9.x are not officialy supported.
# Display a warning for the users on this setup unless they provide
# USE_UNOFFICIAL_OGRE_VERSIONS flag
if (NOT USE_UNOFFICIAL_OGRE_VERSIONS)
# 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."
if ((${OGRE_VERSION} VERSION_LESS 1.9.0) OR (${OGRE_VERSION} VERSION_GREATER_EQUAL 1.10.0))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the find package call above ever going to find something less than 1.9?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eeeeeek no. Changed in ad0b350

IGN_BUILD_WARNING("Ogre 1.x versions different 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
ign_find_package(IgnOGRE VERSION 1.9.0
COMPONENTS ${ign_ogre_components}
REQUIRED_BY ogre
PRIVATE_FOR ogre)
endif()
endif()

Expand Down