From 09dd0d0c2e137ad6bbb8a80782bcee1bb99fa945 Mon Sep 17 00:00:00 2001 From: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> Date: Wed, 1 Mar 2023 15:08:02 +0800 Subject: [PATCH] Fix build error when building SimpleTexturedDirectx11 with VS2022. Signed-off-by: Jackie9527 <80555200+Jackie9527@users.noreply.github.com> --- samples/SimpleTexturedDirectx11/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/SimpleTexturedDirectx11/CMakeLists.txt b/samples/SimpleTexturedDirectx11/CMakeLists.txt index 007ada3af..b05c3b6ae 100644 --- a/samples/SimpleTexturedDirectx11/CMakeLists.txt +++ b/samples/SimpleTexturedDirectx11/CMakeLists.txt @@ -8,6 +8,9 @@ if ( MSVC ) ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS ) ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) REMOVE_DEFINITIONS( -DUNICODE -D_UNICODE ) + if ( MSVC_VERSION GREATER_EQUAL 1930 ) + ADD_DEFINITIONS( -D_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING=1 ) + endif () endif () ADD_COMPILE_DEFINITIONS(SHADER_PATH="${CMAKE_CURRENT_SOURCE_DIR}/SimpleTexturedDirectx11/")