mirror of
https://github.com/NoelFB/blah.git
synced 2025-07-15 18:51:53 +08:00
Emscripten build
This commit is contained in:
@ -89,13 +89,16 @@ endif()
|
||||
# Link and create SDL2 Definition if we're using it
|
||||
if (SDL2_ENABLED)
|
||||
add_compile_definitions(BLAH_USE_SDL2)
|
||||
|
||||
if (NOT DEFINED SDL2_INCLUDE_DIRS OR NOT DEFINED SDL2_LIBRARIES)
|
||||
find_package(SDL2 REQUIRED)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
||||
set_target_properties(blah PROPERTIES COMPILE_FLAGS "-s USE_SDL=2")
|
||||
else()
|
||||
if (NOT DEFINED SDL2_INCLUDE_DIRS OR NOT DEFINED SDL2_LIBRARIES)
|
||||
find_package(SDL2 REQUIRED)
|
||||
endif()
|
||||
|
||||
target_include_directories(blah PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
|
||||
set(LIBS ${LIBS} ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_include_directories(blah PUBLIC "$<BUILD_INTERFACE:${SDL2_INCLUDE_DIRS}>")
|
||||
set(LIBS ${LIBS} ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(blah PUBLIC ${LIBS})
|
||||
|
Reference in New Issue
Block a user