Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 31 additions & 33 deletions .github/workflows/generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,6 @@ jobs:
-DSDL_INSTALL_CPACK=ON \
-DSDL_INSTALL_DOCS=ON \
${{ matrix.platform.cmake-arguments }} \
-DSDL_SHARED=${{ matrix.platform.shared }} \
-DSDL_STATIC=${{ matrix.platform.static }} \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_INSTALL_PREFIX=prefix \
-DCMAKE_INSTALL_LIBDIR=lib \
Expand All @@ -242,14 +240,14 @@ jobs:
run: |
${{ matrix.platform.source-cmd }}
cmake --build build --config ${{ matrix.platform.cmake-build-type }} --verbose -- ${{ matrix.platform.cmake-build-arguments }}
- name: 'Verify SDL_REVISION'
if: ${{ !matrix.platform.no-cmake }}
run: |
echo "This should show us the SDL_REVISION"
echo "Shared library:"
${{ (matrix.platform.shared-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
echo "Static library:"
${{ (matrix.platform.static-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
# - name: 'Verify SDL_REVISION'
# if: ${{ !matrix.platform.no-cmake }}
# run: |
# echo "This should show us the SDL_REVISION"
# echo "Shared library:"
# ${{ (matrix.platform.shared-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.shared-lib)) || 'echo "<Shared library not supported by platform>"' }}
# echo "Static library:"
# ${{ (matrix.platform.static-lib && format('{0} build/{1} | grep "Github Workflow"', matrix.platform.binutils-strings, matrix.platform.static-lib)) || 'echo "<Static library not supported by platform>"' }}
- name: 'Run build-time tests (CMake)'
id: tests
if: ${{ !matrix.platform.no-cmake && matrix.platform.run-tests }}
Expand Down Expand Up @@ -301,19 +299,19 @@ jobs:
echo "Package creation failed after $max_tries attempts."
exit 1
fi
- name: 'Verify CMake configuration files'
if: ${{ steps.install.outcome == 'success' }}
# shell: ${{ matrix.platform.shell }}
run: |
${{ matrix.platform.source-cmd }}
${{ matrix.platform.cmake-config-emulator }} cmake -S cmake/test -B cmake_test_build -GNinja \
${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
-DTEST_SHARED=${{ matrix.platform.shared }} \
-DTEST_STATIC=${{ matrix.platform.static }} \
${{ matrix.platform.cmake-arguments }} \
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
-DCMAKE_PREFIX_PATH="${{ steps.install.outputs.prefix }}"
cmake --build cmake_test_build --verbose --config ${{ matrix.platform.cmake-build-type }} -- ${{ matrix.platform.cmake-build-arguments }}
# - name: 'Verify CMake configuration files'
# if: ${{ steps.install.outcome == 'success' }}
## shell: ${{ matrix.platform.shell }}
# run: |
# ${{ matrix.platform.source-cmd }}
# ${{ matrix.platform.cmake-config-emulator }} cmake -S cmake/test -B cmake_test_build -GNinja \
# ${{ matrix.platform.cmake-toolchain-file != '' && format('-DCMAKE_TOOLCHAIN_FILE={0}', matrix.platform.cmake-toolchain-file) || '' }} \
# -DTEST_SHARED=${{ matrix.platform.shared }} \
# -DTEST_STATIC=${{ matrix.platform.static }} \
# ${{ matrix.platform.cmake-arguments }} \
# -DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
# -DCMAKE_PREFIX_PATH="${{ steps.install.outputs.prefix }}"
# cmake --build cmake_test_build --verbose --config ${{ matrix.platform.cmake-build-type }} -- ${{ matrix.platform.cmake-build-arguments }}
- name: 'Extract CC/CXX/CFLAGS/CXXFLAGS from CMake toolchain'
if: ${{ steps.install.outcome == 'success' && matrix.platform.cc-from-cmake }}
# shell: ${{ matrix.platform.shell }}
Expand All @@ -323,16 +321,16 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.platform.cmake-build-type }} \
-DVAR_PATH=/tmp/env.txt
cat /tmp/env.txt >> $GITHUB_ENV
- name: 'Verify sdl3.pc'
# shell: ${{ matrix.platform.shell }}
if: ${{ steps.install.outcome == 'success' && matrix.platform.test-pkg-config }}
run: |
${{ matrix.platform.source-cmd }}
${{ matrix.platform.cc && format('export CC="{0}"', matrix.platform.cc) || '' }}
${{ matrix.platform.cflags && format('export CFLAGS="{0}"', matrix.platform.cflags) || '' }}
${{ matrix.platform.ldflags && format('export LDFLAGS="{0}"', matrix.platform.ldflags) || '' }}
export PKG_CONFIG_PATH=${{ steps.install.outputs.prefix }}/lib/pkgconfig
cmake/test/test_pkgconfig.sh
# - name: 'Verify sdl3.pc'
## shell: ${{ matrix.platform.shell }}
# if: ${{ steps.install.outcome == 'success' && matrix.platform.test-pkg-config }}
# run: |
# ${{ matrix.platform.source-cmd }}
# ${{ matrix.platform.cc && format('export CC="{0}"', matrix.platform.cc) || '' }}
# ${{ matrix.platform.cflags && format('export CFLAGS="{0}"', matrix.platform.cflags) || '' }}
# ${{ matrix.platform.ldflags && format('export LDFLAGS="{0}"', matrix.platform.ldflags) || '' }}
# export PKG_CONFIG_PATH=${{ steps.install.outputs.prefix }}/lib/pkgconfig
# cmake/test/test_pkgconfig.sh
- name: 'Build (cross-platform-actions, BSD)'
id: cpactions
if: ${{ matrix.platform.cpactions }}
Expand Down
7 changes: 1 addition & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ endif()
set(SDL_SHARED_DEFAULT ON)
set(SDL_STATIC_DEFAULT ON)

set(SDL_SHARED_AVAILABLE ON)
get_cmake_property(SDL_SHARED_AVAILABLE TARGET_SUPPORTS_SHARED_LIBS)
set(SDL_STATIC_AVAILABLE ON)

# All these *_DEFAULT vars will default to ON if not specified,
Expand All @@ -207,11 +207,6 @@ if(EMSCRIPTEN)
# Emscripten/Javascript does not have assembly support, a dynamic library
# loading architecture, or low-level CPU inspection.
set(SDL_ASSEMBLY_DEFAULT OFF)
set(SDL_SHARED_AVAILABLE OFF)
endif()

if(VITA OR PSP OR PS2 OR N3DS OR RISCOS OR NGAGE OR DOS)
set(SDL_SHARED_AVAILABLE OFF)
endif()

if((RISCOS OR UNIX_SYS) AND NOT (LINUX OR NETBSD OR OPENBSD))
Expand Down
Loading