2021-03-01 10:38:21 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-11-28 19:46:40 +02:00
|
|
|
platform=OS64
|
|
|
|
globalPrefix=~/dev/vcmi/vcmi-ios-depends/build/iphoneos
|
2021-04-19 02:38:20 +02:00
|
|
|
qtDir=~/dev/Qt-libs/5.15.2/ios
|
2021-11-23 09:22:42 +02:00
|
|
|
if [[ "$1" ]]; then
|
2021-11-28 19:46:40 +02:00
|
|
|
platform=SIMULATOR64
|
|
|
|
globalPrefix=~/dev/vcmi/vcmi-ios-depends/build/iphonesimulator
|
2021-11-23 09:22:42 +02:00
|
|
|
fi
|
2021-11-28 19:46:40 +02:00
|
|
|
prefixPath="$globalPrefix;$qtDir"
|
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-11-26 14:49:02 +02:00
|
|
|
# cmake "$srcDir" -G Xcode -T buildsystem=1 \
|
|
|
|
cmake "$srcDir" -G Xcode \
|
2021-03-10 09:57:07 +02:00
|
|
|
-DBUNDLE_IDENTIFIER_PREFIX=com.kambala \
|
2021-11-26 14:49:02 +02:00
|
|
|
-DENABLE_PCH=OFF \
|
2021-03-01 10:38:21 +02:00
|
|
|
-Wno-dev \
|
2021-11-26 14:49:02 +02:00
|
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
2021-03-01 10:38:21 +02:00
|
|
|
-DCMAKE_TOOLCHAIN_FILE="$srcDir/ios.toolchain.cmake" \
|
2021-11-28 19:46:40 +02:00
|
|
|
-DPLATFORM=$platform \
|
2021-03-09 09:10:11 +02:00
|
|
|
-DDEPLOYMENT_TARGET=11.0 \
|
2022-06-26 15:02:01 +02:00
|
|
|
-DENABLE_BITCODE=OFF \
|
2021-03-01 10:38:21 +02:00
|
|
|
-DCMAKE_BINARY_DIR=$(pwd) \
|
2021-03-17 19:16:48 +02:00
|
|
|
-DCMAKE_PREFIX_PATH="$prefixPath" \
|
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
|