[build,mac] deployment target & arch variables

allow easy change of target architectures and deployment target
This commit is contained in:
Armin Novak 2023-12-13 18:34:18 +01:00 committed by akallabeth
parent 53cb5f8852
commit 905923d65a
1 changed files with 12 additions and 3 deletions

View File

@ -11,14 +11,23 @@ BINDIR=MacOS
LIBDIR=Frameworks
DATADIR=Resources
OSSL_FLAGS="-arch arm64 -arch x86_64"
DEPLOYMENT_ARCH="arm64 x86_64"
DEPLOYMENT_TARGET=12
CMAKE_ARCHS=
OSSL_FLAGS="-mmacosx-version-min=$DEPLOYMENT_TARGET"
for $ARCH in $DEPLOYMENT_ARCH;
do
OSSL_FLAGS="$OSSL_FLAGS -arch $ARCH"
CMAKE_ARCHS="$CMAKE_ARCHS;$ARCH"
done
CMAKE_ARGS="-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_OSX_ARCHITECTURES='arm64;x86_64' \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12 \
-DCMAKE_OSX_ARCHITECTURES=$CMAKE_ARCHS \
-DCMAKE_OSX_DEPLOYMENT_TARGET=$DEPLOYMENT_TARGET \
-DCMAKE_INSTALL_PREFIX='$INSTALL' \
-DCMAKE_INSTALL_LIBDIR='$LIBDIR' \
-DCMAKE_INSTALL_BINDIR='$BINDIR' \