1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/configure_ios.sh
2022-09-24 15:55:22 +03:00

42 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
platform=OS64
globalPrefix=~/dev/vcmi/vcmi-ios-depends/build/iphoneos
qtDir=~/dev/Qt-libs/5.15.5/ios10-widgets
if [[ "$1" ]]; then
platform=SIMULATOR64
globalPrefix=~/dev/vcmi/vcmi-ios-depends/build/iphonesimulator
fi
prefixPath="$globalPrefix;$qtDir"
# 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
srcDir="../vcmi"
# cmake "$srcDir" -G Xcode -T buildsystem=1 \
cmake "$srcDir" -G Xcode \
-DFORCE_BUNDLED_MINIZIP=ON \
-DBUNDLE_IDENTIFIER_PREFIX=com.kambala \
-Wno-dev \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
--toolchain "$srcDir/ios.toolchain.cmake" \
-DPLATFORM=$platform \
-DDEPLOYMENT_TARGET=12.0 \
-DENABLE_BITCODE=OFF \
-DCMAKE_BINARY_DIR=$(pwd) \
-DCMAKE_PREFIX_PATH="$prefixPath" \
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='Apple Development' \
-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM='4XHN44TEVG'
# -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO
# workaround strange cmake bug that adds compile flag to resources
sed -i '' \
-e 's|\.storyboard \*/; settings = {COMPILER_FLAGS = "-DCMAKE_SKIP_PRECOMPILE_HEADERS "; };|.storyboard */;|g' \
-e 's|\.xcassets \*/; settings = {COMPILER_FLAGS = "-DCMAKE_SKIP_PRECOMPILE_HEADERS "; };|.xcassets */;|g' \
VCMI.xcodeproj/project.pbxproj