Page MenuHomePhabricator

[cmake] Support custom package install paths
Needs ReviewPublic

Authored by Ericson2314 on Jan 22 2022, 4:30 PM.

Details

Summary

Firstly, we we make an additional GNUInstallDirs-style variable. With
NixOS, for example, this is crucial as we want those to go in
${dev}/lib/cmake not ${out}/lib/cmake as would a cmake subdir of the
"regular" libdir.

Secondly, we make *Config.cmake robust to absolute package install
paths. We for NixOS will in fact be passing them absolute paths to make
the ${dev} vs ${out} distinction mentioned above, and the
GNUInstallDirs-style variables are suposed to support absolute paths in
general so it's good practice besides the NixOS use-case.

Thirdly, we make ${project}_INSTALL_PACKAGE_DIR CACHE PATHs like other
install dirs are.

Diff Detail

Event Timeline

Ericson2314 created this revision.Jan 22 2022, 4:30 PM
Herald added a project: Restricted Project. · View Herald Transcript
Ericson2314 requested review of this revision.Jan 22 2022, 4:30 PM
Herald added projects: Restricted Project, Restricted Project, Restricted Project. · View Herald TranscriptJan 22 2022, 4:30 PM

Could one of you review this?