Skip to content

Commit

Permalink
Set INTERFACE_INCLUDE_DIRECTORIES property on SDL2 targets (emscripte…
Browse files Browse the repository at this point in the history
…n-core#19780)

This makes the targets more compatible with upstream SDL2.
  • Loading branch information
madebr authored Jul 27, 2023
1 parent 03ac6c5 commit 3cd9a38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions system/lib/cmake/SDL2/sdl2-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ set(SDL2_LIBRARIES "-sUSE_SDL=2")
if(NOT TARGET SDL2::SDL2)
add_library(SDL2::SDL2 INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
INTERFACE_COMPILE_OPTIONS "-sUSE_SDL=2"
INTERFACE_LINK_LIBRARIES "-sUSE_SDL=2")

add_library(SDL2::SDL2-static INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2-static PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIRS}"
INTERFACE_COMPILE_OPTIONS "-sUSE_SDL=2"
INTERFACE_LINK_LIBRARIES "-sUSE_SDL=2")

Expand Down

0 comments on commit 3cd9a38

Please sign in to comment.