diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ac776e9..871e695 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,7 +43,8 @@ if(nfd_PLATFORM STREQUAL PLATFORM_MACOS) endif() if(nfd_COMPILER STREQUAL COMPILER_MSVC) - target_compile_options(${TARGET_NAME} PRIVATE /EHs-c- /GR-) + string(REPLACE "/EHsc" "/EHs-c-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") + string(REPLACE "/GR" "/GR-" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY STATIC_LIBRARY_OPTIONS /NODEFAULTLIB) endif()