From 1c318db4a093ba7d8838ca8424766789cc944a9e Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Mon, 24 Nov 2025 09:33:59 +0800 Subject: [PATCH] [Fix] (cmake): fix compilation on MSVC --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 74c8593a..bde82e07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,9 @@ if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" OR MOBILEGL_FORCE_RELEASE_OPT) endif() endif() +if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_compile_options(/Zc:preprocessor) +endif() enable_language(CXX)