summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-10-29 08:45:34 +0200
committerSander Vrijders <sander@ouroboros.rocks>2021-10-29 17:06:02 +0200
commit697aacc07202debf88b582998e261cb68f06ae25 (patch)
treee2b54f410f17e999b619b0a05aba194ae1d7eac1
parent8a49b3329f3786d9232ddcdce05414b0ccb4fcad (diff)
downloadouroboros-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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
-rw-r--r--CMakeLists.txt8
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)