More Emscripten build fixes
This commit is contained in:
parent
d290df3f29
commit
a45d9b2779
2 changed files with 5 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Emscripten)
|
|||
set(PSEMEK_GL_LIBRARIES EGL)
|
||||
set(PSEMEK_PACKAGE_AS_LIBRARY OFF CACHE INTERNAL "Build applications as shared libraries")
|
||||
list(APPEND PSEMEK_DEFINITIONS "-DPSEMEK_GLES=1")
|
||||
list(APPEND PSEMEK_CXX_FLAGS -sUSE_SDL=2)
|
||||
list(APPEND PSEMEK_CXX_FLAGS -sUSE_SDL=2 -fexperimental-library)
|
||||
# by default emcc doesn't produce catch clauses, but psemek is designed around exceptions
|
||||
list(APPEND PSEMEK_CXX_FLAGS -sDISABLE_EXCEPTION_CATCHING=0)
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
|
|
|||
|
|
@ -8,8 +8,12 @@ namespace psemek::journal
|
|||
|
||||
std::string current_time()
|
||||
{
|
||||
#ifndef __EMSCRIPTEN__
|
||||
const auto now = std::chrono::system_clock::now();
|
||||
return std::format("{:%FT%TZ}", now);
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue