Provide a more sensible CMAKE_INSTALL_PREFIX default
ClosedPublic

Authored by apol on Jul 23 2019, 9:16 AM.

Details

Summary

If no prefix is passed, use ECM's by default, instead of defaulting to /usr/local which isn't optimal in any case.

Diff Detail

Repository
R240 Extra CMake Modules
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
apol created this revision.Jul 23 2019, 9:16 AM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptJul 23 2019, 9:16 AM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
apol requested review of this revision.Jul 23 2019, 9:16 AM
krop added a subscriber: krop.Jul 23 2019, 9:52 AM
krop added inline comments.
kde-modules/KDEInstallDirs.cmake
429–432

Might be worth adding that this only works with CMake >= 3.7

430

I'm not fond of having this hardcoded.

What about adding a new variable in ECMConfig.cmake with the ${PACKAGE_PREFIX_DIR} value instead?

apol updated this revision to Diff 62392.Jul 23 2019, 1:49 PM

address cgiboudeaux's comments

apol marked 2 inline comments as done.Jul 23 2019, 1:49 PM
krop accepted this revision.Jul 23 2019, 1:50 PM

LGTM

This revision is now accepted and ready to land.Jul 23 2019, 1:50 PM
This revision was automatically updated to reflect the committed changes.