Skip to content

Commit e365605

Browse files
committed
another cmake try
1 parent 95e191b commit e365605

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

cmake/sdl3.cmake

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,16 @@ if(NOT SDL3_FOUND OR NOT SDL3_image_FOUND)
3232
URL_HASH SHA256=2ceb75eab4235c2c7e93dafc3ef3268ad368ca5de40892bf8cffdd510f29d9d8
3333
)
3434

35-
FetchContent_MakeAvailable(SDL3)
36-
FetchContent_MakeAvailable(SDL3_image)
35+
# Official SDL configuration for a unified build tree
36+
set(SDL_SHARED ON CACHE BOOL "" FORCE)
37+
set(SDL_STATIC OFF CACHE BOOL "" FORCE)
38+
set(SDLIMAGE_VENDORED ON CACHE BOOL "" FORCE)
39+
set(SDLIMAGE_ZLIB ON CACHE BOOL "" FORCE)
40+
set(SDLIMAGE_PNG ON CACHE BOOL "" FORCE)
41+
set(SDLIMAGE_APNG ON CACHE BOOL "" FORCE)
42+
43+
# Making them available in order ensures SDL3_image can see the SDL3 targets
44+
FetchContent_MakeAvailable(SDL3 SDL3_image)
3745
endif()
3846

3947
# Uniform aliases to ensure linking works across both discovery methods

0 commit comments

Comments
 (0)