Skip to content

Commit

Permalink
Force CMAKE_MACOSX_DEPLOYMENT_TARGET in CI for Mac builds.
Browse files Browse the repository at this point in the history
CI image appears to set it via an environment variable and overrides
attempts to set it when running CMake.
  • Loading branch information
akb825 committed Jul 5, 2022
1 parent dd73d93 commit 7d98cc6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ set(CUTTLEFISH_INSTALL_PVRTEXLIB ON CACHE BOOL
"Include the PVRTexTool library with the installation.")
set(CUTTLEFISH_INSTALL_SET_RPATH ON CACHE BOOL "Set rpath for library and tool on installation.")

# PVRTexTool library requires 10.14 or higher.
if (NOT CMAKE_OSX_DEPLOYMENT_TARGET)
if (APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
# PVRTexTool library requires 10.14 or higher.
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.14 CACHE STRING "Minimum macOS deployment version." FORCE)
endif()

Expand Down
10 changes: 8 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,28 @@ jobs:
matrix:
static:
lib.type: Static
cmake.args: -GXcode -DCUTTLEFISH_SHARED=OFF -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
cmake.args: >-
-GXcode -DCUTTLEFISH_SHARED=OFF -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
ispc: 0
shared:
lib.type: Shared
cmake.args: -GXcode -DCUTTLEFISH_SHARED=ON -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
cmake.args: >-
-GXcode -DCUTTLEFISH_SHARED=ON -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
ispc: 0
static_ispc:
lib.type: Static
cmake.args: >-
-GXcode -DCUTTLEFISH_SHARED=OFF -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
-DCUTTLEFISH_ISPC_PATH=$(Build.SourcesDirectory)/ispc-v$(ispc.version)-macOS/bin/ispc
ispc: 1
shared_ispc:
lib.type: Shared
cmake.args: >-
-GXcode -DCUTTLEFISH_SHARED=ON -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14
-DCUTTLEFISH_ISPC_PATH=$(Build.SourcesDirectory)/ispc-v$(ispc.version)-macOS/bin/ispc
ispc: 1
artifact: 1
Expand Down

0 comments on commit 7d98cc6

Please sign in to comment.