From d2039541965504a1757ed72ae5f84469a20e782d Mon Sep 17 00:00:00 2001 From: Peter0x44 Date: Sat, 22 Jan 2022 08:14:15 +0000 Subject: [PATCH] Add the necessary flags to CMAKE_EXE_LINKER_FLAGS instead. This solution works for both C and C++ --- Working-for-Web-(HTML5).md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Working-for-Web-(HTML5).md b/Working-for-Web-(HTML5).md index f3b4023..e4f056b 100644 --- a/Working-for-Web-(HTML5).md +++ b/Working-for-Web-(HTML5).md @@ -146,8 +146,8 @@ cmake --build build ```cmake if (EMSCRIPTEN) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") - set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so taht you can directly open it. + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_GLFW=3 -s ASSERTIONS=1 -s WASM=1 -s ASYNCIFY") + set(CMAKE_EXECUTABLE_SUFFIX ".html") # This line is used to set your executable to build with the emscripten html template so that you can directly open it. endif () ```