better cmake for emscripten flags

This commit is contained in:
2022-10-30 16:36:17 +01:00
committed by Erik Scholz
parent c13dff8eb3
commit 4d0f731d8d
12 changed files with 59 additions and 58 deletions

View File

@ -15,12 +15,9 @@ target_link_libraries(input_service
sdl_service
)
if(EMSCRIPTEN)
set_target_properties(input_service PROPERTIES COMPILE_FLAGS "-s USE_SDL=2")
set_target_properties(input_service PROPERTIES LINK_FLAGS "-s USE_SDL=2")
else()
target_include_directories(input_service PUBLIC "${SDL2_INCLUDE_DIR}")
endif()
#if(NOT EMSCRIPTEN)
#target_include_directories(input_service PUBLIC "${SDL2_INCLUDE_DIR}")
#endif()
if (BUILD_TESTING)
add_subdirectory(test)