Skip to content

Commit

Permalink
Update PlatformSpecific.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
u3dreal committed Jan 26, 2020
1 parent 75f46bb commit 3010167
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions cmake/PlatformSpecific.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ ENDIF(MSVC)
###########################################################################

IF(APPLE)

CMAKE_MINIMUM_REQUIRED(VERSION 3.12) # Required for FindBoost 1.67.0

########## OS and hardware detection ###########
Expand All @@ -165,7 +166,7 @@ IF(APPLE)
ELSEIF(${MAC_SYS} MATCHES 17)
SET(OSX_SYSTEM 10.14)
ELSEIF(${MAC_SYS} MATCHES 16)
SET(OSX_SYSTEM 10.12)
SET(OSX_SYSTEM 10.13)
ELSE()
SET(OSX_SYSTEM unsupported)
ENDIF()
Expand All @@ -178,9 +179,17 @@ IF(APPLE)
ENDIF()

SET(CMAKE_XCODE_ATTRIBUTE_ARCHS $(NATIVE_ARCH_ACTUAL))

SET(CMAKE_OSX_SYSROOT /Applications/Xcode_10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk)
SET(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx) # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT, gets latest available


SET(AZURE 1) # Set 0 when compiled locally and not on azure

IF(AZURE)
SET(CMAKE_OSX_SYSROOT /Applications/Xcode_10.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk)
ELSE()
SET(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk)
ENDIF()

SET(CMAKE_XCODE_ATTRIBUTE_SDKROOT macosx) # to silence sdk not found warning, just overrides CMAKE_OSX_SYSROOT, gets latest available

# set a precedence of sdk path over all other default search pathes
SET(CMAKE_FIND_ROOT_PATH ${CMAKE_OSX_SYSROOT})
Expand Down

0 comments on commit 3010167

Please sign in to comment.