mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-09 01:14:24 +02:00
cmake: add support for creating Apple frameworks with CMake
This commit is contained in:
committed by
Anonymous Maarten
parent
93c25e650c
commit
13c294eec3
25
.github/workflows/main.yml
vendored
25
.github/workflows/main.yml
vendored
@@ -26,7 +26,8 @@ jobs:
|
||||
- { name: Windows (ucrt64), os: windows-latest, shell: 'msys2 {0}', msystem: ucrt64, msys-env: mingw-w64-ucrt-x86_64 }
|
||||
- { name: Ubuntu 20.04, os: ubuntu-20.04, shell: sh }
|
||||
- { name: Ubuntu 22.04, os: ubuntu-22.04, shell: sh }
|
||||
- { name: MacOS, os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"' }
|
||||
- { name: MacOS (Framework), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DSDL_FRAMEWORK=ON', skip_test_pkgconfig: true }
|
||||
- { name: MacOS (GNU prefix), os: macos-latest, shell: sh, cmake: '-DCMAKE_OSX_ARCHITECTURES="x86_64"' }
|
||||
|
||||
steps:
|
||||
- name: Set up MSYS2
|
||||
@@ -69,13 +70,13 @@ jobs:
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.cmake }}
|
||||
-DSDL_TESTS=ON \
|
||||
-DSDL_WERROR=ON \
|
||||
-DSDL_INSTALL_TESTS=ON \
|
||||
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${{ matrix.platform.cmake }}
|
||||
- name: Build (CMake)
|
||||
run: |
|
||||
cmake --build build/ --config Release --verbose --parallel
|
||||
@@ -92,15 +93,17 @@ jobs:
|
||||
run: |
|
||||
set -eu
|
||||
cmake --install build/ --config Release
|
||||
echo "SDL3_DIR=$(pwd)/cmake_prefix" >> $GITHUB_ENV
|
||||
( cd cmake_prefix; find . ) | LC_ALL=C sort -u
|
||||
- name: Verify CMake configuration files
|
||||
run: |
|
||||
cmake -S cmake/test -B cmake_config_build -G Ninja \
|
||||
-DTEST_SHARED=ON \
|
||||
-DTEST_STATIC=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${{ env.SDL3_DIR }}
|
||||
-DCMAKE_PREFIX_PATH=$(echo "${{ github.workspace }}/cmake_prefix" | sed -e 's#\\#/#g')
|
||||
cmake --build cmake_config_build --verbose
|
||||
- name: Verify sdl3.pc
|
||||
if: ${{ !matrix.platform.skip_test_pkgconfig }}
|
||||
run: |
|
||||
export PKG_CONFIG_PATH=${{ env.SDL3_DIR }}/lib/pkgconfig
|
||||
export PKG_CONFIG_PATH=$(echo "${{ github.workspace }}/cmake_prefix/lib/pkgconfig" | sed -e 's#\\#/#g')
|
||||
cmake/test/test_pkgconfig.sh
|
||||
|
||||
Reference in New Issue
Block a user