Skip to content

Don't set default install prefix to /usr

If no prefix is passed, use ECM's by default if ECM is installed to a custom prefix. I.e. don't use /usr because that would be an even worse default than /usr/local (and is reserved for packaged software).

Reasoning:

I regularly install software that I'm working on to /usr/local as an easy way to use it with different users on my local system. Given that this is the default in cmake and that projects are discouraged from overwriting the default, it's hardly surprising that I did not explicitly set the install prefix to /usr/local but used the default value.

I see the benefit of using ECM_PREFIX if a custom installation of ECM is used. I just don't think that this behaviour is appropriate if the distro version of ECM that is installed under /usr is used.

Potential shortfalls:

While /usr is the default prefix for most UNIX-like distros and OSs, checking for that prefix is not a generic approach that will work for every possible packaging situation.

Edit: remove potentially charged wording

Edited by Johannes Zarl-Zierl

Merge request reports