allow CMAKE_PREFIX_PATH discovery mechanism to work #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We use a package management that sets
CMAKE_PREFIX_PATH
,CMAKE_LIBRARY_PATH
, andCMAKE_INCLUDE_PATH
cmake environment variables for each dependent package pulled into a build. This allows them to be discovered by other projects that usefind_path
andfind_library
commands in cmake. Everything works as expected in USD -- the includes and libraries are found by cmake -- but USD's Find*.cmake modules add the root/base dir variables asREQUIRED_VARS
even though they are not used elsewhere in the build process or absolutely necessary to find the libraries. These should be optional.Regarding these changes to FindGLEW.cmake:
I don't know why
NO_DEFAULT_PATH
was added in the first place, but this is very restrictive. I opened it up just a bit. From the cmake docs forfind_library
:In summary, removing NO_DEFAULT_PATH enables 4 additional search routines (3 & 6 are arguments to the command itself and I don't think that NO_DEFAULT_PATH disables these).
I need 1 & 2 enabled, but to be safe I disabled 4 & 5 using NO_SYSTEM_ENVIRONMENT_PATH and NO_CMAKE_SYSTEM_PATH.
Btw, I've signed the Pixar USD CLA.