diff --git a/Yubico.NativeShims/CMakeLists.txt b/Yubico.NativeShims/CMakeLists.txt index 73accfe2..9a7ff8bf 100644 --- a/Yubico.NativeShims/CMakeLists.txt +++ b/Yubico.NativeShims/CMakeLists.txt @@ -25,8 +25,9 @@ elseif(NOT MSVC) string(CONCAT CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} " -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports.gnu") else() +#enable control flow guard for windows string(CONCAT CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} - " /def:\"${CMAKE_CURRENT_SOURCE_DIR}/exports.msvc\"") + " /guard:cf /def:\"${CMAKE_CURRENT_SOURCE_DIR}/exports.msvc\"") endif()