Files
UnrealEngineUWP/Engine/Source/ThirdParty/Imath/BuildForMac.command
aurel cordonnier fc542f6cfd Merge from Release-Engine-Staging @ 18081189 to Release-Engine-Test
This represents UE4/Main @18073326, Release-5.0 @18081140 and Dev-PerfTest @18045971

[CL 18081471 by aurel cordonnier in ue5-release-engine-test branch]
2021-11-07 23:43:01 -05:00

59 lines
1.4 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
)
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.