{"action":"created","issue":{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/505","labels_url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/505/labels{/name}","comments_url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/505/comments","events_url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/505/events","html_url":"https://github.com/schuhschuh/cmake-basis/issues/505","id":123458758,"number":505,"title":"Use DEPENDS_<PKG>_DIR cache entries for each dependency","user":{"login":"schuhschuh","id":975451,"avatar_url":"https://avatars.githubusercontent.com/u/975451?v=3","gravatar_id":"","url":"https://api.github.com/users/schuhschuh","html_url":"https://github.com/schuhschuh","followers_url":"https://api.github.com/users/schuhschuh/followers","following_url":"https://api.github.com/users/schuhschuh/following{/other_user}","gists_url":"https://api.github.com/users/schuhschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/schuhschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuhschuh/subscriptions","organizations_url":"https://api.github.com/users/schuhschuh/orgs","repos_url":"https://api.github.com/users/schuhschuh/repos","events_url":"https://api.github.com/users/schuhschuh/events{/privacy}","received_events_url":"https://api.github.com/users/schuhschuh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/labels/4%20-%20Documenting","name":"4 - Documenting","color":"ecf8c5"},{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/labels/CMake","name":"CMake","color":"fbca04"},{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/labels/Feature","name":"Feature","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"schuhschuh","id":975451,"avatar_url":"https://avatars.githubusercontent.com/u/975451?v=3","gravatar_id":"","url":"https://api.github.com/users/schuhschuh","html_url":"https://github.com/schuhschuh","followers_url":"https://api.github.com/users/schuhschuh/followers","following_url":"https://api.github.com/users/schuhschuh/following{/other_user}","gists_url":"https://api.github.com/users/schuhschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/schuhschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuhschuh/subscriptions","organizations_url":"https://api.github.com/users/schuhschuh/orgs","repos_url":"https://api.github.com/users/schuhschuh/repos","events_url":"https://api.github.com/users/schuhschuh/events{/privacy}","received_events_url":"https://api.github.com/users/schuhschuh/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/milestones/22","html_url":"https://github.com/schuhschuh/cmake-basis/milestones/v3.3.0","labels_url":"https://api.github.com/repos/schuhschuh/cmake-basis/milestones/22/labels","id":493191,"number":22,"title":"v3.3.0","description":"","creator":{"login":"schuhschuh","id":975451,"avatar_url":"https://avatars.githubusercontent.com/u/975451?v=3","gravatar_id":"","url":"https://api.github.com/users/schuhschuh","html_url":"https://github.com/schuhschuh","followers_url":"https://api.github.com/users/schuhschuh/followers","following_url":"https://api.github.com/users/schuhschuh/following{/other_user}","gists_url":"https://api.github.com/users/schuhschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/schuhschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuhschuh/subscriptions","organizations_url":"https://api.github.com/users/schuhschuh/orgs","repos_url":"https://api.github.com/users/schuhschuh/repos","events_url":"https://api.github.com/users/schuhschuh/events{/privacy}","received_events_url":"https://api.github.com/users/schuhschuh/received_events","type":"User","site_admin":false},"open_issues":99,"closed_issues":1,"state":"open","created_at":"2013-11-22T00:44:11Z","updated_at":"2016-01-10T01:23:12Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-12-22T10:56:06Z","updated_at":"2016-01-12T09:27:59Z","closed_at":null,"body":"For each dependency, the user should only have to set a single path, either the installation root directory (prefix) or the location of the CMake package configuration file (```<PKG>Config.cmake``` or ```<pkg>-config.cmake```). The latter is specified using a ```<PKG>_DIR``` variable. These variables are, however, not grouped nicely together because of the lack of a common prefix. Further, one can argue that expert users expect those variables to always point to the location of a CMake configuration file (though I disagree with this interpretation).\r\n\r\nCMake BASIS should define a single cache entry for each dependency, named ```DEPENDS_<PKG>_DIR```. The internal ```<PKG>_DIR``` variable is set to the value of this user path, possibly after appending the package specific subdirectory where the CMake configuration file is located."},"comment":{"url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/comments/170850124","html_url":"https://github.com/schuhschuh/cmake-basis/issues/505#issuecomment-170850124","issue_url":"https://api.github.com/repos/schuhschuh/cmake-basis/issues/505","id":170850124,"user":{"login":"schuhschuh","id":975451,"avatar_url":"https://avatars.githubusercontent.com/u/975451?v=3","gravatar_id":"","url":"https://api.github.com/users/schuhschuh","html_url":"https://github.com/schuhschuh","followers_url":"https://api.github.com/users/schuhschuh/followers","following_url":"https://api.github.com/users/schuhschuh/following{/other_user}","gists_url":"https://api.github.com/users/schuhschuh/gists{/gist_id}","starred_url":"https://api.github.com/users/schuhschuh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schuhschuh/subscriptions","organizations_url":"https://api.github.com/users/schuhschuh/orgs","repos_url":"https://api.github.com/users/schuhschuh/repos","events_url":"https://api.github.com/users/schuhschuh/events{/privacy}","received_events_url":"https://api.github.com/users/schuhschuh/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T09:27:59Z","updated_at":"2016-01-12T09:27:59Z","body":"Standard CMake Find module variables are documented now [here](https://cmake.org/cmake/help/v3.4/manual/cmake-developer.7.html#standard-variable-names).\r\n\r\nNote that while the CMake consensus is to call these variables ```<Pkg>_*```, CMake BASIS deliberately uses the ```DEPENDS_``` prefix for the one hybrid variable for each package that should be displayed to the user and is set to either the ```<Pkg>_ROOT_DIR``` or ```<Pkg>_DIR```. All other variables are either advanced or not cached. The common ```DEPENDS_``` prefix allows those variables to be grouped in the CMake GUI. Add non-cached boolean option to ```BasisSettings.cmake``` which can be overridden by developers in their project ```Settings.cmake``` file to request the use of ```<Pkg>_ROOT_DIR``` for packages found by MODULE mode (i.e., Find\\<Pkg\\>.cmake) and ```<Pkg>_DIR``` for packages found by CONFIG mode of ```find_package```.\r\n\r\n- [ ] Set ```DEPENDS_<Pkg>_DIR``` to ```<Pkg>_ROOT_DIR``` when set before/after ```find_package```."}}