You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Wrapped the build in try/finally to always clean up of the build directory. - Fixed target platform construction to include the target architecture. - Fixed target platform construction to log an error on failure instead of crashing on a null dereference later. - Fixed configuration name comparisons to be case-insensitive. - Added an optional BinOutputPath param to match LibOutputPath. - Changed to an empty default MakeTarget because CMake was not generating a target with the previous default name. - Changed BuildTargetLib to use cmake --build instead of implementing custom build logic for every target platform. - Changed Linux to use CMake and make from the path instead of attempting to use the Mac binaries. - Simplified the TargetPlatform interface to remove a lot of boilerplate code from the implementations. #jira none #rb Brandon.Schaefer [CL 14439522 by devin doucette in ue5-main branch]
23 lines
1.1 KiB
Bash
Executable File
23 lines
1.1 KiB
Bash
Executable File
#!/bin/zsh -e
|
|
# Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
# Usage: BuildLibForIOS.command <LibName> <LibVersion> [Configs] [Archs] [DeploymentTarget]
|
|
|
|
LIB_NAME=${1:?Missing library name argument}
|
|
LIB_VERSION=${2:?Missing library version argument}
|
|
LIB_CONFIGS=(${=3:-Debug Release})
|
|
LIB_ARCHS=(${=4:-arm64 x86_64})
|
|
LIB_DEPLOYMENT_TARGET=${5:-11.0}
|
|
LIB_DIR=${0:a:h:h:h:h}/${LIB_NAME}/${LIB_VERSION}/lib/IOS
|
|
ENGINE_ROOT=${0:a:h:h:h:h:h:h}
|
|
|
|
for Config in ${LIB_CONFIGS}; do
|
|
for Arch in ${LIB_ARCHS}; do
|
|
echo "Building ${LIB_NAME}-${LIB_VERSION} for iOS ${Arch} in ${Config}..."
|
|
${ENGINE_ROOT}/Build/BatchFiles/RunUAT.command BuildCMakeLib -TargetPlatform=IOS -TargetArchitecture=${Arch} -TargetLib=${LIB_NAME} -TargetLibVersion=${LIB_VERSION} -TargetConfigs=${Config} -LibOutputPath=lib -CMakeGenerator=Makefile -CMakeAdditionalArguments="-DCMAKE_OSX_DEPLOYMENT_TARGET=${LIB_DEPLOYMENT_TARGET}" -SkipCreateChangelist
|
|
done
|
|
mkdir -p ${LIB_DIR}/${Config}
|
|
lipo -create -output ${LIB_DIR}/${Config}/lib${LIB_NAME}.a ${LIB_DIR}/${^LIB_ARCHS}/${Config}/lib${LIB_NAME}.a
|
|
rm -rf ${LIB_DIR}/${^LIB_ARCHS}
|
|
done
|