Skip to content

Commit 274c345

Browse files
sjb7Shubham Jain
andauthored
Configuring option for force resetting the osx deployment target (#1016)
* Configuring option for force resetting the osx deployment target Co-authored-by: Shubham Jain <shubhamjain@adminisatorsMBP.guest.corp.microsoft.com>
1 parent 38820bd commit 274c345

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ if(APPLE)
2525

2626
# iOS build options
2727
option(BUILD_IOS "Build for iOS" NO)
28+
option(FORCE_RESET_OSX_DEPLOYMENT_TARGET "Clear the OSX Deployment Target Set" YES)
2829

2930
if(BUILD_IOS)
3031
set(TARGET_ARCH "APPLE")
3132
set(IOS True)
3233
set(APPLE True)
33-
set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
34+
35+
if(FORCE_RESET_OSX_DEPLOYMENT_TARGET)
36+
set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING "Force unset of the deployment target for iOS" FORCE)
37+
endif()
38+
3439
if((${IOS_PLAT} STREQUAL "iphonesimulator") AND (${IOS_ARCH} STREQUAL "arm64"))
3540
# iOS arm64 simulator is supported starting BigSur
3641
# Unfortunately, CMAKE produces a device binary (not simulator) when providing -miphoneos-version-min flag when building iOS arm64 simulator

0 commit comments

Comments
 (0)