diff --git a/CMakeLists.txt b/CMakeLists.txt index 788a5477..4ebdb21b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,8 +120,13 @@ if(ENABLE_GLSLANG_WEB) if(ENABLE_EMSCRIPTEN_SINGLE_FILE) add_link_options("SHELL: -s SINGLE_FILE=1") endif(ENABLE_EMSCRIPTEN_SINGLE_FILE) - else(EMSCRIPTEN) - add_compile_options(-Os -g -flto -fno-exceptions) + else() + if(MSVC) + add_compile_options(/Os /GR-) + else() + add_compile_options(-Os -fno-exceptions) + add_link_options(-Os) + endif() endif(EMSCRIPTEN) endif(ENABLE_GLSLANG_WEB)