changes to build system, emscipten progress (can render solid color, yippie!)

This commit is contained in:
veclavtalica
2025-02-21 19:06:19 +03:00
parent dd4fc45be3
commit f25e27b102
11 changed files with 29 additions and 12 deletions

View File

@@ -148,6 +148,7 @@ function(give_options_without_warnings target)
-fno-signed-zeros
-fno-trapping-math
-freciprocal-math
# TODO: require packaging for web case
$<$<BOOL:${EMSCRIPTEN}>:-sUSE_SDL=2>)
set(BUILD_FLAGS_RELEASE
@@ -169,7 +170,8 @@ function(give_options_without_warnings target)
set(LINK_FLAGS
-Bsymbolic-functions
$<$<BOOL:${EMSCRIPTEN}>:-sLEGACY_GL_EMULATION -sGL_FFP_ONLY -sGL_UNSAFE_OPTS>
$<$<BOOL:${EMSCRIPTEN}>:-sLEGACY_GL_EMULATION -sGL_FFP_ONLY -sGL_UNSAFE_OPTS=1>
$<$<BOOL:${EMSCRIPTEN}>:--preload-file ${TWN_OUT_DIR}/data@data -sALLOW_MEMORY_GROWTH>
$<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-Wl,--as-needed>
$<$<BOOL:${LINUX}>:-Wl,--hash-style=gnu>)
@@ -198,7 +200,6 @@ function(give_options_without_warnings target)
target_link_options(${target} PUBLIC
${BUILD_FLAGS}
${LINK_FLAGS}
# -Wl,--no-undefined # TODO: use later for implementing no-libc
$<$<CONFIG:Release>:${LINK_FLAGS_RELEASE}>
$<$<CONFIG:Debug>:${BUILD_FLAGS_DEBUG}>)