-
Notifications
You must be signed in to change notification settings - Fork 287
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 invalid usage of OGRE_DIR in CMakeLists.txt #1192
Fix invalid usage of OGRE_DIR in CMakeLists.txt #1192
Conversation
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/cmake") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/CMake") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for this PR.
I would prefer that you add a new path instead of replacing that could lead to side effects.
Your 2 lines are the same.
Since windows is unable to make difference between lower and upper case, put simply
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, did not paid attention that it lead to duplicated lines.
Ok to me to keep both OGRE_DIR
paths (with and without the cmake
suffix).
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/cmake") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/CMake") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}") | ||
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/OGRE/cmake") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here:
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/cmake")
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/CMake")
list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be list(APPEND CMAKE_MODULE_PATH "${OGRE_DIR}/CMake")
The
OGRE_DIR
cmake variable seems not correctly used here, as it will be set to the directory containing the configuration cmake file (as defined here: https://cmake.org/cmake/help/latest/command/find_package.html#full-signature ).In other words, the
OGRE_DIR
variable typically already ends up with a/cmake
directory, so theCMAKE_MODULE_PATH
should not be appended by an extra/cmake
directory.