diff options
author | Dimitri Staessens <[email protected]> | 2021-10-29 08:45:34 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-10-29 17:06:02 +0200 |
commit | 697aacc07202debf88b582998e261cb68f06ae25 (patch) | |
tree | e2b54f410f17e999b619b0a05aba194ae1d7eac1 | |
parent | 8a49b3329f3786d9232ddcdce05414b0ccb4fcad (diff) | |
download | ouroboros-697aacc07202debf88b582998e261cb68f06ae25.tar.gz ouroboros-697aacc07202debf88b582998e261cb68f06ae25.zip |
build: Install into /usr/local by default on OS X
On more recent Mac OS X (>= Catalina) the system volume is read-only,
even with System Integrity Protection disabled. This requires an
additional remount step to install something into /usr. Probably
better to play by their rules and default the install to /usr/local.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e7182396..6e49074d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,13 @@ if (NOT CMAKE_BUILD_TYPE) endif() if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "/usr" CACHE STRING "Installation Prefix" FORCE) + if (APPLE) + set(CMAKE_INSTALL_PREFIX "/usr/local" CACHE STRING + "Installation Prefix" FORCE) + else() + set(CMAKE_INSTALL_PREFIX "/usr" CACHE STRING + "Installation Prefix" FORCE) + endif() endif () if (APPLE) |