OpenTTD-patches/os/emscripten/cmake/FindSDL2.cmake
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
2020-12-15 15:46:39 +01:00

8 lines
204 B
CMake

add_library(SDL2::SDL2 INTERFACE IMPORTED)
set_target_properties(SDL2::SDL2 PROPERTIES
INTERFACE_COMPILE_OPTIONS "-sUSE_SDL=2"
INTERFACE_LINK_LIBRARIES "-sUSE_SDL=2"
)
set(SDL2_FOUND on)