File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 9393
9494 - name : Build mgconsole
9595 run : |
96- cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local .
96+ cmake -B build -G Ninja -DOPENSSL_ROOT_DIR="$(brew --prefix openssl)" -DCMAKE_BUILD_TYPE=Release .
9797 cmake --build build
9898 sudo cmake --install build
9999
Original file line number Diff line number Diff line change @@ -33,11 +33,16 @@ string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
3333# Enable explicit static linking of SSL because of generic Linux binary.
3434set (MGCONSOLE_STATIC_SSL OFF CACHE STRING "Statically link SSL" )
3535
36- # Set default installation directory to '/usr'
36+ # Set default installation directory
3737if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
38- # '/usr' is a special case, for more details see:
39- # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#special-cases
40- set (CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "install dir" FORCE)
38+ if (APPLE )
39+ # On macOS, use /usr/local as /usr/bin is protected by SIP
40+ set (CMAKE_INSTALL_PREFIX "/usr/local" CACHE PATH "install dir" FORCE)
41+ else ()
42+ # '/usr' is a special case, for more details see:
43+ # https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html#special-cases
44+ set (CMAKE_INSTALL_PREFIX "/usr" CACHE PATH "install dir" FORCE)
45+ endif ()
4146endif ()
4247
4348add_subdirectory (src)
You can’t perform that action at this time.
0 commit comments