Files
UnrealEngineUWP/Engine/Source/ThirdParty/Imath/BuildForMac.command
matt johnson 57386f110f VFX Reference Platform Libs: bump macOS deployment target to 11.0 in build scripts
This will ensure that the next builds of these third-party libraries for macOS will
be built with 11.0 as the minimum deployment target, which conforms to the
VFX reference platform for CY2023 and CY2024.

#rb none

[CL 27563997 by matt johnson in ue5-main branch]
2023-09-01 15:35:39 -04:00

60 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
set -e
IMATH_VERSION=3.1.3
UE_MODULE_LOCATION=`pwd`
SOURCE_LOCATION="$UE_MODULE_LOCATION/Imath-$IMATH_VERSION"
BUILD_LOCATION="$UE_MODULE_LOCATION/Intermediate"
# Specify all of the include/bin/lib directory variables so that CMake can
# compute relative paths correctly for the imported targets.
INSTALL_INCLUDEDIR=include
INSTALL_BIN_DIR="Mac/bin"
INSTALL_LIB_DIR="Mac/lib"
INSTALL_LOCATION="$UE_MODULE_LOCATION/Deploy/Imath-$IMATH_VERSION"
INSTALL_INCLUDE_LOCATION="$INSTALL_LOCATION/$INSTALL_INCLUDEDIR"
INSTALL_MAC_LOCATION="$INSTALL_LOCATION/Mac"
rm -rf $BUILD_LOCATION
rm -rf $INSTALL_INCLUDE_LOCATION
rm -rf $INSTALL_MAC_LOCATION
mkdir $BUILD_LOCATION
pushd $BUILD_LOCATION
CMAKE_ARGS=(
-DCMAKE_INSTALL_PREFIX="$INSTALL_LOCATION"
-DCMAKE_INSTALL_INCLUDEDIR="$INSTALL_INCLUDEDIR"
-DCMAKE_INSTALL_BINDIR="$INSTALL_BIN_DIR"
-DCMAKE_INSTALL_LIBDIR="$INSTALL_LIB_DIR"
-DCMAKE_OSX_DEPLOYMENT_TARGET="11.0"
-DBUILD_SHARED_LIBS=FALSE
-DIMATH_INSTALL_PKG_CONFIG=FALSE
-DBUILD_TESTING=OFF
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
)
echo Configuring build for Imath version $IMATH_VERSION...
cmake -G "Xcode" $SOURCE_LOCATION "${CMAKE_ARGS[@]}"
echo Building Imath for Debug...
cmake --build . --config Debug
echo Installing Imath for Debug...
cmake --install . --config Debug
echo Building Imath for Release...
cmake --build . --config Release
echo Installing Imath for Release...
cmake --install . --config Release
popd
echo Done.