Merge branch 'cmake-min-ios-version' of https://github.com/discnl/wxWidgets
Differentiate between macOS and iOS minimal supported version for CMake builds. See https://github.com/wxWidgets/wxWidgets/pull/2146
This commit is contained in:
@@ -62,7 +62,7 @@ jobs:
|
||||
name: wxOSX iOS Xcode 11.4
|
||||
- os: osx
|
||||
osx_image: xcode11.4
|
||||
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12" wxCMAKE_SAMPLES=OFF wxCMAKE_TESTS=OFF
|
||||
env: wxTOOLSET=cmake wxCMAKE_GENERATOR=Xcode wxCMAKE_DEFINES="-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_FIND_ROOT_PATH=/usr/local -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO" wxCMAKE_SAMPLES=OFF wxCMAKE_TESTS=OFF
|
||||
name: wxOSX iOS CMake Xcode 11.4
|
||||
- dist: bionic
|
||||
compiler: gcc
|
||||
|
@@ -26,10 +26,16 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release")
|
||||
endif()
|
||||
|
||||
# This block, particularly the versions used, should be kept in sync with
|
||||
# samples/minimal/CMakeLists.txt.
|
||||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
# If no deployment target has been set default to the minimum supported
|
||||
# OS X version (this has to be set before the first project() call)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
|
||||
# OS version (this has to be set before the first project() call)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0 CACHE STRING "iOS Deployment Target")
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(build/cmake/policies.cmake NO_POLICY_SCOPE)
|
||||
|
@@ -16,6 +16,16 @@
|
||||
# Declare the minimum required CMake version
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
if(APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
# If no deployment target has been set default to the minimum supported
|
||||
# OS version (this has to be set before the first project() call)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0 CACHE STRING "iOS Deployment Target")
|
||||
else()
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10 CACHE STRING "macOS Deployment Target")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Name the project
|
||||
project(minimal)
|
||||
|
||||
|
Reference in New Issue
Block a user