summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorSuhaib Mujahid <[email protected]>2020-09-30 20:27:48 -0400
committerGitHub <[email protected]>2020-09-30 17:27:48 -0700
commit111185838cebe3415e47c75e67fb81295952ce68 (patch)
tree314d30aba8968c63320addf08d822ac7459013d4 /script
parentf3a746d7b6a27a9d6f98143641466f68ef1f3dee (diff)
feat: Enable change the system install path (#653)
#### Problem: The current `CMAKE_INSTALL_PREFIX` value for the `system` build mode is `/usr`. However, in`macOS` as an example, you cannot write to `/usr` without `sudo` permission. #### Proposed solution: Enable changing the value to `/usr/local` (or any other path). This change makes the script use the value of the environment variable `SYSTEM_INSTALL_PREFIX` to select the installation path. If the variable is not set, it fallback to the path `/usr`.
Diffstat (limited to 'script')
-rwxr-xr-xscript/build-libgit2.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/script/build-libgit2.sh b/script/build-libgit2.sh
index 89e7534..dd11314 100755
--- a/script/build-libgit2.sh
+++ b/script/build-libgit2.sh
@@ -47,7 +47,7 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then
fi
if [ "${BUILD_SYSTEM}" = "ON" ]; then
- BUILD_INSTALL_PREFIX="/usr"
+ BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
else
BUILD_INSTALL_PREFIX="${BUILD_PATH}/install"
mkdir -p "${BUILD_PATH}/install/lib"