Skip to content

Commit

Permalink
Reverted the changes in SDL CMakeLists.txt and added a workaround where
Browse files Browse the repository at this point in the history
we include the library
  • Loading branch information
tanis2000 committed Jan 29, 2025
1 parent 8f07688 commit 9bcd42b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/deps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ add_subdirectory(wren)
set(SDL_STATIC ON)
set(SDL_CAMERA OFF)
set(SDL_VULKAN OFF)
# Workaround for https://github.com/libsdl-org/SDL/issues/12078
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
add_subdirectory(sdl EXCLUDE_FROM_ALL)

if (NOT EMSCRIPTEN)
Expand Down
4 changes: 2 additions & 2 deletions src/deps/sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3451,7 +3451,7 @@ if(SDL_SHARED)
set_property(TARGET SDL3-shared APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
set_property(TARGET SDL3-shared PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
# target_precompile_headers(SDL3-shared PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
target_precompile_headers(SDL3-shared PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
endif()
endif()

Expand All @@ -3475,7 +3475,7 @@ if(SDL_STATIC)
set_property(TARGET SDL3-static APPEND PROPERTY COMPATIBLE_INTERFACE_STRING "SDL_VERSION")
set_property(TARGET SDL3-static PROPERTY INTERFACE_SDL_VERSION "SDL${SDL3_VERSION_MAJOR}")
if(NOT CMAKE_VERSION VERSION_LESS "3.16")
# target_precompile_headers(SDL3-static PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
target_precompile_headers(SDL3-static PRIVATE "$<$<OR:$<COMPILE_LANGUAGE:C>,$<COMPILE_LANGUAGE:CXX>>:${PROJECT_SOURCE_DIR}/src/SDL_internal.h>")
endif()
endif()

Expand Down

0 comments on commit 9bcd42b

Please # to comment.