Use CMake's build and install functionality
This allows simplification, this functionality was added long ago to CMake. Further motivation is to be able to re-direct the installation, make/ninja install allow this by setting DESTDIR but this generally doesnt work well with window paths (see [1]). [1] - https://cmake.org/cmake/help/latest/envvar/DESTDIR.html#envvar:DESTDIR
This commit is contained in:
1 parent
97cd12a63a
commit
d0a03c46c0
5 files changed
+10
-18
No files matched your search
+2
-4
@@ -62,7 +62,6 @@ cd runtimes
|
||||
|
||||
if command -v ninja >/dev/null; then
|
||||
CMAKE_GENERATOR="Ninja"
|
||||
BUILDCMD=ninja
|
||||
else
|
||||
: ${CORES:=$(nproc 2>/dev/null)}
|
||||
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
||||
@@ -73,7 +72,6 @@ else
|
||||
CMAKE_GENERATOR="MSYS Makefiles"
|
||||
;;
|
||||
esac
|
||||
BUILDCMD=make
|
||||
fi
|
||||
|
||||
for arch in $ARCHS; do
|
||||
@@ -114,7 +112,7 @@ for arch in $ARCHS; do
|
||||
-DCMAKE_CXX_FLAGS_INIT="$CFGUARD_CFLAGS" \
|
||||
..
|
||||
|
||||
$BUILDCMD ${CORES:+-j${CORES}}
|
||||
$BUILDCMD install
|
||||
cmake --build . ${CORES:+-j${CORES}}
|
||||
cmake --install .
|
||||
cd ..
|
||||
done
|
||||
Reference in new issue
Block a user