mirror of
https://github.com/encounter/SDL.git
synced 2025-12-10 05:57:44 +00:00
cmake: Enable CET compatibility for x86/x64 targets using VS 16.7+
This commit is contained in:
committed by
Sam Lantinga
parent
00452e47fa
commit
2ceea46061
@@ -47,6 +47,11 @@ if(WINDOWS)
|
||||
link_libraries(mingw32)
|
||||
endif()
|
||||
|
||||
# CET support was added in VS 16.7
|
||||
if(MSVC_VERSION GREATER 1926 AND NOT CMAKE_GENERATOR_PLATFORM MATCHES ARM)
|
||||
link_libraries(-CETCOMPAT)
|
||||
endif()
|
||||
|
||||
# FIXME: Parent directory CMakeLists.txt only sets these for mingw/cygwin,
|
||||
# but we need them for VS as well.
|
||||
link_libraries(SDL2main)
|
||||
|
||||
Reference in New Issue
Block a user