{"action":"created","issue":{"url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/36","repository_url":"https://api.github.com/repos/PixarAnimationStudios/USD","labels_url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/36/comments","events_url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/36/events","html_url":"https://github.com/PixarAnimationStudios/USD/pull/36","id":174403177,"number":36,"title":"allow CMAKE_PREFIX_PATH discovery mechanism to work","user":{"login":"chadrik","id":63251,"avatar_url":"https://avatars.githubusercontent.com/u/63251?v=3","gravatar_id":"","url":"https://api.github.com/users/chadrik","html_url":"https://github.com/chadrik","followers_url":"https://api.github.com/users/chadrik/followers","following_url":"https://api.github.com/users/chadrik/following{/other_user}","gists_url":"https://api.github.com/users/chadrik/gists{/gist_id}","starred_url":"https://api.github.com/users/chadrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadrik/subscriptions","organizations_url":"https://api.github.com/users/chadrik/orgs","repos_url":"https://api.github.com/users/chadrik/repos","events_url":"https://api.github.com/users/chadrik/events{/privacy}","received_events_url":"https://api.github.com/users/chadrik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"sunyab","id":11516093,"avatar_url":"https://avatars.githubusercontent.com/u/11516093?v=3","gravatar_id":"","url":"https://api.github.com/users/sunyab","html_url":"https://github.com/sunyab","followers_url":"https://api.github.com/users/sunyab/followers","following_url":"https://api.github.com/users/sunyab/following{/other_user}","gists_url":"https://api.github.com/users/sunyab/gists{/gist_id}","starred_url":"https://api.github.com/users/sunyab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunyab/subscriptions","organizations_url":"https://api.github.com/users/sunyab/orgs","repos_url":"https://api.github.com/users/sunyab/repos","events_url":"https://api.github.com/users/sunyab/events{/privacy}","received_events_url":"https://api.github.com/users/sunyab/received_events","type":"User","site_admin":false},"assignees":[{"login":"sunyab","id":11516093,"avatar_url":"https://avatars.githubusercontent.com/u/11516093?v=3","gravatar_id":"","url":"https://api.github.com/users/sunyab","html_url":"https://github.com/sunyab","followers_url":"https://api.github.com/users/sunyab/followers","following_url":"https://api.github.com/users/sunyab/following{/other_user}","gists_url":"https://api.github.com/users/sunyab/gists{/gist_id}","starred_url":"https://api.github.com/users/sunyab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunyab/subscriptions","organizations_url":"https://api.github.com/users/sunyab/orgs","repos_url":"https://api.github.com/users/sunyab/repos","events_url":"https://api.github.com/users/sunyab/events{/privacy}","received_events_url":"https://api.github.com/users/sunyab/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2016-08-31T23:30:31Z","updated_at":"2016-10-15T19:18:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PixarAnimationStudios/USD/pulls/36","html_url":"https://github.com/PixarAnimationStudios/USD/pull/36","diff_url":"https://github.com/PixarAnimationStudios/USD/pull/36.diff","patch_url":"https://github.com/PixarAnimationStudios/USD/pull/36.patch"},"body":"We use a package management that sets `CMAKE_PREFIX_PATH`, `CMAKE_LIBRARY_PATH`, and `CMAKE_INCLUDE_PATH` [cmake environment variables](https://cmake.org/Wiki/CMake_Useful_Variables#Environment_Variables) for each dependent package pulled into a build.  This allows them to be discovered by other projects that use `find_path` and `find_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 as `REQUIRED_VARS` even though they are not used elsewhere in the build process or absolutely necessary to find the libraries.  These should be optional.\r\n\r\nRegarding these changes to FindGLEW.cmake:\r\n\r\n```diff\r\n-            NO_DEFAULT_PATH\r\n+            NO_SYSTEM_ENVIRONMENT_PATH\r\n+            NO_CMAKE_SYSTEM_PATH\r\n```\r\n\r\nI 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 for `find_library`:\r\n\r\n> Additional search locations can be specified after the PATHS argument. If ENV var is found in the HINTS or PATHS section the environment variable var will be read and converted from a system environment variable to a cmake style list of paths. For example ENV PATH would be a way to list the system path variable. The argument after DOC will be used for the documentation string in the cache. PATH_SUFFIXES specifies additional subdirectories to check below each search path.\r\n\r\n> If NO_DEFAULT_PATH is specified, then no additional paths are added to the search. If NO_DEFAULT_PATH is not specified, the search process is as follows:\r\n\r\n> 1) Search paths specified in cmake-specific cache variables. These are intended to be used on the command line with a -DVAR=value. This can be skipped if NO_CMAKE_PATH is passed.\r\n<prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and <prefix>/lib for each <prefix> in > - CMAKE_PREFIX_PATH\r\n> - CMAKE_LIBRARY_PATH\r\n> - CMAKE_FRAMEWORK_PATH\r\n> \r\n> 2) Search paths specified in cmake-specific environment variables. These are intended to be set in the user’s shell configuration. This can be skipped if NO_CMAKE_ENVIRONMENT_PATH is passed.\r\n<prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and <prefix>/lib for each <prefix> in > - CMAKE_PREFIX_PATH\r\n> - CMAKE_LIBRARY_PATH\r\n> - CMAKE_FRAMEWORK_PATH\r\n>\r\n> 3) Search the paths specified by the HINTS option. These should be paths computed by system introspection, such as a hint provided by the location of another item already found. Hard-coded guesses should be specified with the PATHS option.\r\n>\r\n> 4) Search the standard system environment variables. This can be skipped if NO_SYSTEM_ENVIRONMENT_PATH is an argument.\r\n> - PATH and LIB\r\n> \r\n> 5) Search cmake variables defined in the Platform files for the current system. This can be skipped if NO_CMAKE_SYSTEM_PATH is passed.\r\n> - <prefix>/lib/<arch> if CMAKE_LIBRARY_ARCHITECTURE is set, and <prefix>/lib for each <prefix> in > - CMAKE_SYSTEM_PREFIX_PATH\r\n> - CMAKE_SYSTEM_LIBRARY_PATH\r\n> - CMAKE_SYSTEM_FRAMEWORK_PATH\r\n> \r\n> 6) Search the paths specified by the PATHS option or in the short-hand version of the command. These are typically hard-coded guesses.\r\n\r\nIn 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). \r\nI need 1 & 2 enabled, but to be safe I disabled 4 & 5 using NO_SYSTEM_ENVIRONMENT_PATH and NO_CMAKE_SYSTEM_PATH.\r\n\r\nBtw, I've signed the Pixar USD CLA."},"comment":{"url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/comments/254005027","html_url":"https://github.com/PixarAnimationStudios/USD/pull/36#issuecomment-254005027","issue_url":"https://api.github.com/repos/PixarAnimationStudios/USD/issues/36","id":254005027,"user":{"login":"drwave","id":1679418,"avatar_url":"https://avatars.githubusercontent.com/u/1679418?v=3","gravatar_id":"","url":"https://api.github.com/users/drwave","html_url":"https://github.com/drwave","followers_url":"https://api.github.com/users/drwave/followers","following_url":"https://api.github.com/users/drwave/following{/other_user}","gists_url":"https://api.github.com/users/drwave/gists{/gist_id}","starred_url":"https://api.github.com/users/drwave/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drwave/subscriptions","organizations_url":"https://api.github.com/users/drwave/orgs","repos_url":"https://api.github.com/users/drwave/repos","events_url":"https://api.github.com/users/drwave/events{/privacy}","received_events_url":"https://api.github.com/users/drwave/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T19:18:17Z","updated_at":"2016-10-15T19:18:17Z","body":"Sunya has been on vacation for the past several weeks. I’m sure he’ll be able to respond some time early next week.\n\n\n> On Oct 15, 2016, at 8:02 AM, Chad Dombrova <notifications@github.com> wrote:\n> \n> Hi, any updates? There are a number of people on the mailing lists looking for help using rez to build USD and I think our method of using env variables to add to cmake's search path can really simplify the process, but they can't use it unless this change gets merged. Thanks!\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub <https://github.com/PixarAnimationStudios/USD/pull/36#issuecomment-253989457>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABmgOk8_Lt_exQHSEzFTJxl7-oizKooEks5q0OrpgaJpZM4JyK2m>.\n> \n\n"}}
{"actor":{"display_login":"drwave"}}