mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
add CMake presets for iOS
This commit is contained in:
parent
1bb6a20b76
commit
e0244c69a3
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,6 +40,7 @@ VCMI_VS11.sdf
|
||||
*.ipch
|
||||
VCMI_VS11.opensdf
|
||||
.DS_Store
|
||||
CMakeUserPresets.json
|
||||
|
||||
# Visual Studio
|
||||
*.suo
|
||||
|
@ -160,6 +160,7 @@ set(CMAKE_MAP_IMPORTED_CONFIG_RELEASE Release RelWithDebInfo MinSizeRel "")
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Debug] dwarf)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_GCC_WARN_64_TO_32_BIT_CONVERSION NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_MARKETING_VERSION ${APP_SHORT_VERSION})
|
||||
set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH NO)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] YES)
|
||||
|
@ -2,19 +2,31 @@
|
||||
"version": 2,
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default-release",
|
||||
"name": "release-binary-dir",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}"
|
||||
},
|
||||
{
|
||||
"name": "base-release",
|
||||
"inherits": "release-binary-dir",
|
||||
"hidden": true,
|
||||
"binaryDir": "${sourceDir}/out/build/${presetName}",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
|
||||
"PACKAGE_FILE_NAME" : "$env{VCMI_PACKAGE_FILE_NAME}",
|
||||
"PACKAGE_NAME_SUFFIX" : "$env{VCMI_PACKAGE_NAME_SUFFIX}",
|
||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||
"FORCE_BUNDLED_FL": "OFF",
|
||||
"ENABLE_TEST": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "default-release",
|
||||
"inherits": "base-release",
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"FORCE_BUNDLED_FL": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" : "linux-release",
|
||||
"inherits" : "default-release",
|
||||
@ -87,6 +99,41 @@
|
||||
"description": "VCMI MacOS Xcode",
|
||||
"inherits": "default-release",
|
||||
"generator": "Xcode"
|
||||
},
|
||||
{
|
||||
"name": "ios-device",
|
||||
"displayName": "Base iOS device",
|
||||
"description": "Base VCMI preset for iOS device",
|
||||
"generator": "Xcode",
|
||||
"binaryDir": "../build-${presetName}",
|
||||
"cacheVariables": {
|
||||
"CMAKE_SYSTEM_NAME": "iOS",
|
||||
"FORCE_BUNDLED_FL": "ON",
|
||||
"FORCE_BUNDLED_MINIZIP": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ios-simulator",
|
||||
"displayName": "Base iOS simulator",
|
||||
"description": "Base VCMI preset for iOS simulator",
|
||||
"inherits": "ios-device",
|
||||
"cacheVariables": {
|
||||
"CMAKE_OSX_SYSROOT": "iphonesimulator"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ios-release",
|
||||
"displayName": "iOS release",
|
||||
"description": "VCMI iOS release",
|
||||
"inherits": [
|
||||
"base-release",
|
||||
"ios-device",
|
||||
"release-binary-dir"
|
||||
],
|
||||
"cacheVariables": {
|
||||
"BUNDLE_IDENTIFIER_PREFIX": "eu.vcmi",
|
||||
"CMAKE_PREFIX_PATH": "TODO"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
@ -135,6 +182,17 @@
|
||||
"name": "windows-msvc-relwithdebinfo",
|
||||
"configurePreset": "windows-msvc-release",
|
||||
"inherits": "default-release"
|
||||
},
|
||||
{
|
||||
"name": "ios-release",
|
||||
"configurePreset": "ios-release",
|
||||
"inherits": "default-release",
|
||||
"targets": ["vcmiclient"],
|
||||
"nativeToolOptions": [
|
||||
"-quiet",
|
||||
"CODE_SIGNING_ALLOWED_FOR_APPS=NO",
|
||||
"GCC_OPTIMIZATION_LEVEL=3"
|
||||
]
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
@ -172,4 +230,4 @@
|
||||
"inherits": "default-release"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
prefixPath=~/dev/vcmi/vcmi-ios-depends/build/iphoneos
|
||||
if [[ "$1" ]]; then
|
||||
prefixPath=~/dev/vcmi/vcmi-ios-depends/build/iphonesimulator
|
||||
fi
|
||||
|
||||
# -DCMAKE_OSX_SYSROOT=iphonesimulator
|
||||
|
||||
cmake ../vcmi -G Xcode \
|
||||
-DCMAKE_SYSTEM_NAME=iOS \
|
||||
-DFORCE_BUNDLED_MINIZIP=ON \
|
||||
-DBUNDLE_IDENTIFIER_PREFIX=com.kambala \
|
||||
-Wno-dev \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-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
|
Loading…
Reference in New Issue
Block a user