feat: Enable change the system install path (#653) (#654)

#### 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`.

(cherry picked from commit 111185838c)

Co-authored-by: Suhaib Mujahid <suhaibmujahid@gmail.com>
This commit is contained in:
github-actions[bot] 2020-09-30 17:31:20 -07:00 committed by GitHub
parent 6cb9c7cf41
commit 27f87bd821
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ if [ -z "${BUILD_SHARED_LIBS}" ]; then
fi fi
if [ "${BUILD_SYSTEM}" = "ON" ]; then if [ "${BUILD_SYSTEM}" = "ON" ]; then
BUILD_INSTALL_PREFIX="/usr" BUILD_INSTALL_PREFIX=${SYSTEM_INSTALL_PREFIX-"/usr"}
else else
BUILD_INSTALL_PREFIX="${BUILD_PATH}/install" BUILD_INSTALL_PREFIX="${BUILD_PATH}/install"
mkdir -p "${BUILD_PATH}/install/lib" mkdir -p "${BUILD_PATH}/install/lib"