Skip to content

Commit

Permalink
Merge pull request #294 from u3dreal/master
Browse files Browse the repository at this point in the history
Update azure-pipelines.yml for MacOS 10.14
  • Loading branch information
Dade916 authored Jan 26, 2020
2 parents a5ec80a + 3010167 commit 15ee79f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ jobs:
condition: succeeded()
timeoutInMinutes: 0
pool:
vmImage: 'macOS-10.13'
vmImage: 'macOS-10.14'
variables:
version_string: $[ dependencies.DetectBuildType.outputs['setvarStep.version_string'] ]

Expand Down
23 changes: 17 additions & 6 deletions cmake/PlatformSpecific.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,18 +152,21 @@ ENDIF(MSVC)
###########################################################################

IF(APPLE)

CMAKE_MINIMUM_REQUIRED(VERSION 3.12) # Required for FindBoost 1.67.0

########## OS and hardware detection ###########

EXECUTE_PROCESS(COMMAND uname -r OUTPUT_VARIABLE MAC_SYS) # check for actual system-version

SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13) # Minimum OS requirements for LuxCore

IF(${MAC_SYS} MATCHES 17)

IF(${MAC_SYS} MATCHES 18)
SET(OSX_SYSTEM 10.14)
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 @@ -176,9 +179,17 @@ IF(APPLE)
ENDIF()

SET(CMAKE_XCODE_ATTRIBUTE_ARCHS $(NATIVE_ARCH_ACTUAL))

SET(CMAKE_OSX_SYSROOT /Applications/Xcode.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
2 changes: 2 additions & 0 deletions scripts/azurepipeline/macos/install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

#switch to XCode 10.1
sudo xcode-select -s /Applications/Xcode_10.1.app
#Install Build Tools
brew install bison
brew install pyenv
Expand Down

0 comments on commit 15ee79f

Please sign in to comment.