2021-03-01 10:38:21 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-04-19 02:38:20 +02:00
|
|
|
boostPrefix=~/dev/other/Apple-Boost-BuildScript/build-static/boost/1.75.0/ios/debug/prefix
|
2021-03-17 19:16:48 +02:00
|
|
|
ffmpegDir=~/dev/ios/vcmi-ios-deps/mobile-ffmpeg-min-universal-4.4
|
2021-03-01 10:38:21 +02:00
|
|
|
sdlLibsDir=~/dev/ios/vcmi-ios-deps/SDL2-lib
|
2021-04-19 02:38:20 +02:00
|
|
|
qtDir=~/dev/Qt-libs/5.15.2/ios
|
2021-11-23 09:22:42 +02:00
|
|
|
tbbDir=~/dev/ios/vcmi-ios-deps/oneTBB-2021.4.0/build/install
|
|
|
|
luajitDir=~/dev/ios/vcmi-ios-deps/LuaJIT-2.1/ios64
|
|
|
|
if [[ "$1" ]]; then
|
|
|
|
tbbDir=~/dev/ios/vcmi-ios-deps/oneTBB-2021.4.0/build-sim/install
|
|
|
|
luajitDir=~/dev/ios/vcmi-ios-deps/LuaJIT-2.1/sim64
|
|
|
|
fi
|
|
|
|
prefixPath="$boostPrefix;$ffmpegDir;$sdlLibsDir;$qtDir;$tbbDir;$luajitDir"
|
2021-03-17 19:16:48 +02:00
|
|
|
|
|
|
|
# prefixPath="$boostPrefix;$sdlLibsDir"
|
|
|
|
# xcodeMajorVersion=$(xcodebuild -version | fgrep Xcode | cut -d ' ' -f 2 | cut -d . -f 1)
|
|
|
|
# if [[ $xcodeMajorVersion -ge 12 ]]; then
|
|
|
|
# extraVars=-DCMAKE_FRAMEWORK_PATH=~/dev/ios/vcmi-ios-deps/mobile-ffmpeg-min-gpl-4.4-xc12-frameworks
|
|
|
|
# else
|
|
|
|
# prefixPath+=;~/dev/ios/vcmi-ios-deps/mobile-ffmpeg-min-universal
|
|
|
|
# fi
|
2021-03-01 10:38:21 +02:00
|
|
|
|
|
|
|
srcDir="../vcmi"
|
2021-03-17 19:16:48 +02:00
|
|
|
cmake "$srcDir" -G Xcode -T buildsystem=1 \
|
2021-03-10 09:57:07 +02:00
|
|
|
-DBUNDLE_IDENTIFIER_PREFIX=com.kambala \
|
2021-03-01 10:38:21 +02:00
|
|
|
-Wno-dev \
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$srcDir/ios.toolchain.cmake" \
|
2021-03-05 18:26:35 +02:00
|
|
|
-DPLATFORM=${1:-OS64} \
|
2021-03-09 09:10:11 +02:00
|
|
|
-DDEPLOYMENT_TARGET=11.0 \
|
2021-03-01 10:38:21 +02:00
|
|
|
-DENABLE_BITCODE=0 \
|
|
|
|
-DCMAKE_BINARY_DIR=$(pwd) \
|
2021-03-17 19:16:48 +02:00
|
|
|
-DCMAKE_PREFIX_PATH="$prefixPath" \
|
2021-03-01 10:38:21 +02:00
|
|
|
-DSDL2_INCLUDE_DIR=~/dev/ios/vcmi-ios-deps/SDL/include \
|
|
|
|
-DSDL2_IMAGE_INCLUDE_DIR=~/dev/ios/vcmi-ios-deps/SDL_image-release-2.0.5 \
|
|
|
|
-DSDL2_MIXER_INCLUDE_DIR=~/dev/ios/vcmi-ios-deps/SDL_mixer-release-2.0.4 \
|
|
|
|
-DSDL2_TTF_INCLUDE_DIR=~/dev/ios/vcmi-ios-deps/SDL_ttf-release-2.0.15 \
|
2021-03-12 13:01:00 +02:00
|
|
|
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='Apple Development' \
|
|
|
|
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM='4XHN44TEVG'
|
|
|
|
# -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
|