mirror of
https://github.com/ares-emulator/ares.git
synced 2026-10-12 02:11:04 +00:00
Changes the regex used to determine our macOS SDK version to match on Command Line Tools install paths and not just Xcode install paths, since we do not require Xcode to build ares, just the Xcode Command Line Tools. Also fixes up how we handle the macOS deployment target. (boring details below) CMake is meant to transparently derive and pass appropriate compiler options for our minimum deployment target. It does this via the `CMAKE_OSX_DEPLOYMENT_TARGET` variable. This variable can be initialized either by the project (which must happen before the `project()` call), or else as part of the `project()` call, CMake will inherit it from the `MACOSX_DEPLOYMENT_TARGET` environment variable, or else "compute it based on the host platform" (whatever that means). Our desired behavior is to set it to 10.13, except for local builds, where we should respect the MACOSX_DEPLOYMENT_TARGET environment variable (if it is set). This PR enables that behavior. --------- Co-authored-by: invertego <[email protected]>
177 lines
5.5 KiB
JSON
177 lines
5.5 KiB
JSON
{
|
|
"version": 3,
|
|
"cmakeMinimumRequired": {
|
|
"major": 3,
|
|
"minor": 28,
|
|
"patch": 0
|
|
},
|
|
"configurePresets": [
|
|
{
|
|
"name": "baseCacheVars",
|
|
"hidden": true,
|
|
"cacheVariables": {
|
|
"ARES_PROFILE_ACCURACY": false,
|
|
"ARES_BUILD_LOCAL": true,
|
|
"ENABLE_CCACHE": true
|
|
}
|
|
},
|
|
{
|
|
"name": "macos",
|
|
"displayName": "macOS",
|
|
"description": "Xcode project (host architecture by default)",
|
|
"inherits": ["baseCacheVars"],
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Darwin"
|
|
},
|
|
"generator": "Xcode",
|
|
"binaryDir": "${sourceDir}/build_macos",
|
|
"cacheVariables": {
|
|
"ARES_CODESIGN_IDENTITY": {"type": "STRING", "value": "$penv{CODESIGN_IDENT}"},
|
|
"ARES_CODESIGN_TEAM": {"type": "STRING", "value": "$penv{CODESIGN_TEAM}"},
|
|
"ARES_BUILD_OPTIONAL_TARGETS": true,
|
|
"ENABLE_CCACHE": true
|
|
}
|
|
},
|
|
{
|
|
"name": "windows",
|
|
"displayName": "Windows (Visual Studio, ClangCL)",
|
|
"description": "Visual Studio project using ClangCL (host architecture)",
|
|
"inherits": ["baseCacheVars"],
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Windows"
|
|
},
|
|
"binaryDir": "${sourceDir}/build_vsclang",
|
|
"generator": "Visual Studio 17 2022",
|
|
"toolset": "ClangCL",
|
|
"cacheVariables": {
|
|
"ENABLE_CCACHE": true
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-msvc",
|
|
"displayName": "Windows (Visual Studio, MSVC)",
|
|
"description": "Visual Studio project using MSVC (host architecture)",
|
|
"inherits": ["baseCacheVars"],
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Windows"
|
|
},
|
|
"binaryDir": "${sourceDir}/build_msvc",
|
|
"generator": "Visual Studio 17 2022",
|
|
"cacheVariables": {
|
|
"ENABLE_CCACHE": true
|
|
}
|
|
},
|
|
{
|
|
"name": "macos-ci-universal",
|
|
"displayName": "macOS for CI",
|
|
"description": "Universal binary for building on Github Actions",
|
|
"inherits": ["baseCacheVars"],
|
|
"condition": {
|
|
"type": "equals",
|
|
"lhs": "${hostSystemName}",
|
|
"rhs": "Darwin"
|
|
},
|
|
"generator": "Xcode",
|
|
"binaryDir": "${sourceDir}/build",
|
|
"cacheVariables": {
|
|
"CMAKE_OSX_ARCHITECTURES": {"type": "STRING", "value": "x86_64;arm64"},
|
|
"CMAKE_OSX_DEPLOYMENT_TARGET": {"type": "STRING", "value": "10.13"},
|
|
"ARES_CODESIGN_IDENTITY": {"type": "STRING", "value": "$penv{MACOS_CERTIFICATE_NAME}"},
|
|
"ARES_CODESIGN_TEAM": {"type": "STRING", "value": "$penv{MACOS_NOTARIZATION_TEAMID}"},
|
|
"ENABLE_CCACHE": true,
|
|
"ARES_BUILD_LOCAL": false,
|
|
"ARES_UNITY_CORES": true,
|
|
"ARES_BUILD_OPTIONAL_TARGETS": true
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-ci-base",
|
|
"hidden": true,
|
|
"inherits": ["baseCacheVars"],
|
|
"binaryDir": "${sourceDir}/build",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "RelWithDebInfo"},
|
|
"ENABLE_CCACHE": true,
|
|
"ARES_BUILD_LOCAL": false,
|
|
"ARES_BUILD_OPTIONAL_TARGETS": true,
|
|
"ARES_UNITY_CORES": true,
|
|
"ARES_PRECOMPILE_HEADERS": true
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-ci-mingw-native",
|
|
"displayName": "Windows for CI (x64 MSYS2/MinGW Clang)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"inherits": ["windows-ci-base"],
|
|
"generator": "Ninja"
|
|
},
|
|
{
|
|
"name": "windows-ci-cl-native",
|
|
"displayName": "Windows for CI (x64 ClangCL)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"generator": "Visual Studio 17 2022",
|
|
"inherits": ["windows-ci-base"],
|
|
"toolset": "ClangCL"
|
|
},
|
|
{
|
|
"name": "windows-ci-cl-cross",
|
|
"displayName": "Windows for CI (arm64 ClangCL)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"inherits": ["windows-ci-base"],
|
|
"generator": "Visual Studio 17 2022",
|
|
"architecture": "arm64",
|
|
"toolset": "ClangCL",
|
|
"cacheVariables": {
|
|
"ARES_CROSSCOMPILING": true
|
|
}
|
|
},
|
|
{
|
|
"name": "windows-ci-msvc-native",
|
|
"displayName": "Windows for CI (x64 MSVC)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"generator": "Visual Studio 17 2022",
|
|
"inherits": ["windows-ci-base"]
|
|
},
|
|
{
|
|
"name": "windows-ci-msvc-cross",
|
|
"displayName": "Windows for CI (arm64 MSVC)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"generator": "Visual Studio 17 2022",
|
|
"architecture": "arm64",
|
|
"inherits": ["windows-ci-base"],
|
|
"cacheVariables": {
|
|
"ARES_CROSSCOMPILING": true
|
|
}
|
|
},
|
|
{
|
|
"name": "ubuntu-ci",
|
|
"displayName": "Ubuntu CI (x64 gcc)",
|
|
"description": "Single-arch binary for building on Github Actions",
|
|
"generator": "Ninja",
|
|
"binaryDir": "${sourceDir}/build",
|
|
"cacheVariables": {
|
|
"CMAKE_BUILD_TYPE": {"type": "STRING", "value": "RelWithDebInfo"},
|
|
"ENABLE_CCACHE": true,
|
|
"ARES_BUILD_LOCAL": false,
|
|
"ARES_BUILD_OPTIONAL_TARGETS": true,
|
|
"ARES_PRECOMPILE_HEADERS": false
|
|
}
|
|
}
|
|
],
|
|
"buildPresets": [
|
|
{
|
|
"name": "windows",
|
|
"configurePreset": "windows",
|
|
"displayName": "Windows build (host architecture)",
|
|
"description": "Windows build (host architecture)",
|
|
"configuration": "RelWithDebInfo"
|
|
}
|
|
]
|
|
}
|