cmake: port back Apple changes from SDL3

This commit is contained in:
Anonymous Maarten
2024-08-12 19:17:38 +02:00
committed by Anonymous Maarten
parent 70890b175e
commit 354a35c1d7
4 changed files with 26 additions and 20 deletions

View File

@@ -29,6 +29,7 @@ jobs:
- { name: Ubuntu 22.04 (CMake), os: ubuntu-22.04, shell: sh }
- { name: Ubuntu 22.04 (autotools), os: ubuntu-22.04, shell: sh, autotools: true }
- { name: iOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES="arm64"', cross: true, test-pkg-config: false }
- { name: MacOS (CMake), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
- { name: MacOS (autotools), os: macos-latest, shell: sh, autotools: true }
@@ -107,7 +108,7 @@ jobs:
${{ matrix.platform.source_cmd }}
cmake --build build/ --config Release --verbose --parallel
- name: Run build-time tests (CMake)
if: "! matrix.platform.autotools"
if: ${{ ! matrix.platform.autotools && !matrix.platform.cross }}
run: |
${{ matrix.platform.source_cmd }}
set -eu
@@ -197,14 +198,17 @@ jobs:
${{ matrix.platform.source_cmd }}
cmake -S cmake/test -B cmake_config_build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
${{ matrix.platform.cmake }} \
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
cmake --build cmake_config_build --verbose
- name: Verify sdl2-config
if: ${{ !!matrix.platform.test-pkg-config }}
run: |
${{ matrix.platform.source_cmd }}
export PATH=${{ env.SDL2_DIR }}/bin:$PATH
cmake/test/test_sdlconfig.sh
- name: Verify sdl2.pc
if: ${{ !!matrix.platform.test-pkg-config }}
run: |
${{ matrix.platform.source_cmd }}
export PKG_CONFIG_PATH=${{ env.SDL2_DIR }}/lib/pkgconfig