Skip to content

Commit

Permalink
Fix deployment target for x64-osx
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Feb 9, 2024
1 parent 29c2582 commit b42708a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ jobs:
with:
submodules: recursive

- name: Basic
run: |
if [[ $(grep -oP "set\(VCPKG_OSX_DEPLOYMENT_TARGET \K[0-9\.]+" vcpkg/triplets/${{ matrix.triplet }}.cmake) == "${{ matrix.deployment-target }}" ]] then;
echo "Building for minimum OSX version ${{ matrix.deployment-target }}"
true
else
echo "The minimum OSX versions requested in the workflow deployment-target and in the triplet vcpkg/triplets/${{ matrix.triplet }} do not match."
false
fi
- name: 🌾 Prepare variables
id: vars
run: |
Expand Down
5 changes: 3 additions & 2 deletions vcpkg/triplets/arm64-osx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ set(VCPKG_OSX_ARCHITECTURES arm64)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0)
set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)
# See https://github.com/microsoft/vcpkg/issues/10038
set(VCPKG_C_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET})
set(VCPKG_CXX_FLAGS -mmacosx-version-min=${VCPKG_OSX_DEPLOYMENT_TARGET})
4 changes: 4 additions & 0 deletions vcpkg/triplets/x64-osx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)
set(VCPKG_BUILD_TYPE release)

set(VCPKG_OSX_DEPLOYMENT_TARGET 11.0)
set(VCPKG_C_FLAGS -mmacosx-version-min=11.0)
set(VCPKG_CXX_FLAGS -mmacosx-version-min=11.0)

0 comments on commit b42708a

Please sign in to comment.