cmake+ci: build shared and static libraries on ci

This commit is contained in:
Anonymous Maarten 2023-02-16 20:15:59 +01:00 committed by Sam Lantinga
parent bde4c738bb
commit e203046a5c
4 changed files with 8 additions and 2 deletions

View File

@ -43,6 +43,8 @@ jobs:
-DSDL_CLANG_TIDY=ON \
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
-DSDL_SHARED=ON \
-DSDL_STATIC=ON \
-DSDL_STATIC_PIC=ON \
-DSDL_VENDOR_INFO="Github Workflow" \
-DCMAKE_INSTALL_PREFIX=prefix \

View File

@ -73,6 +73,8 @@ jobs:
run: |
cmake -S . -B build -G Ninja \
-Wdeprecated -Wdev -Werror \
-DSDL_SHARED=ON \
-DSDL_STATIC=ON \
-DSDL_TESTS=ON \
-DSDL_WERROR=ON \
-DSDL_INSTALL_TESTS=ON \

View File

@ -46,6 +46,8 @@ jobs:
run: cmake -S build -B build `
-Wdeprecated -Wdev -Werror `
-DSDL_WERROR=${{ !matrix.platform.nowerror }} `
-DSDL_SHARED=ON `
-DSDL_STATIC=ON `
-DSDL_TESTS=ON `
-DSDL_INSTALL_TESTS=ON `
-DSDL_VENDOR_INFO="Github Workflow" `

View File

@ -13,7 +13,7 @@ include(CMakePushCheckState)
include(GNUInstallDirs)
set(SDL_TESTS_LINK_SHARED_DEFAULT ON)
if(EMSCRIPTEN OR N3DS OR PS2 OR PSP OR RISCOS OR VITA)
if(EMSCRIPTEN OR N3DS OR PS2 OR PSP OR VITA)
set(SDL_TESTS_LINK_SHARED_DEFAULT OFF)
endif()
@ -27,7 +27,7 @@ else()
endif()
if(NOT TARGET SDL3::${sdl_name_component})
find_package(SDL3 3.0.0 REQUIRED COMPONENTS ${sdl_name_component} SDL3_test)
find_package(SDL3 3.0.0 REQUIRED CONFIG COMPONENTS ${sdl_name_component} SDL3_test)
endif()
# CMake incorrectly detects opengl32.lib being present on MSVC ARM64