Files
UnrealEngineUWP/Engine/Source/ThirdParty/Imath/BuildForMac.command
will damon 1a8e12bec5 Rebuild Imath and OpenEXR libraries for Mac
#rb dave.hunter, andrew.grant
#jira UE-141506
#rnx
#lockdown cristina.riveron

#ROBOMERGE-AUTHOR: will.damon
#ROBOMERGE-SOURCE: CL 18885994 in //UE5/Release-5.0/... via CL 18886048 via CL 18886524
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18886585 by will damon in ue5-main branch]
2022-02-07 11:36:26 -05: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="10.9"
-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.