File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,6 +39,23 @@ set(BIN_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE STRING "Directory where
3939set (LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR} " CACHE STRING "Directory where library will install" )
4040set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_FULL_INCLUDEDIR} " CACHE PATH "The directory the headers are installed in" )
4141
42+ if (MSVC )
43+ add_compile_options (/GS /W3 /guard:cf /sdl )
44+ add_link_options (/guard:cf )
45+ if (CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL ARM64)
46+ add_compile_options (/guard:ehcont /guard:signret )
47+ add_link_options (/guard:ehcont /guard:delayloadsignret )
48+ endif ()
49+ if (CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL x64)
50+ add_compile_options (/guard:ehcont )
51+ add_link_options (/guard:ehcont /CETCOMPAT )
52+ endif ()
53+ if (CMAKE_CXX_COMPILER_ARCHITECTURE_ID STREQUAL X86)
54+ add_compile_options ()
55+ add_link_options (/CETCOMPAT )
56+ endif ()
57+ endif ()
58+
4259if (VCPKG_TARGET_TRIPLET)
4360 set (ZenLib_CONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX} /share/zenlib" )
4461elseif (MSVC )
You can’t perform that action at this time.
0 commit comments