fix: set windows.h definitions on WIN32 instead of MSVC (#6534)

This commit is contained in:
nerix
2025-11-01 12:40:45 +01:00
committed by GitHub
parent fca6012100
commit f7bb4c79f2
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -33,6 +33,7 @@
- Dev: Fixed compilation warnings on clang-cl. (#6528)
- Dev: Fixed compilation error in tests with Clang 21. (#6519)
- Dev: The LuaLS meta files moved from `docs/plugin-meta.lua` to `docs/lua-meta/globals.lua`. (#6530)
- Dev: Compile time definitions for `Windows.h` are now conditional based on `WIN32` instead of `MSVC`. (#6534)
## 2.5.4
+4 -3
View File
@@ -1076,6 +1076,10 @@ target_compile_definitions(${LIBRARY_PROJECT} PUBLIC
IRC_NAMESPACE=Communi
$<$<BOOL:${WIN32}>:_WIN32_WINNT=0x0A00> # Windows 10
$<$<BOOL:${BUILD_TESTS}>:CHATTERINO_WITH_TESTS>
# Disable min/max macros from Windows.h
$<$<BOOL:${WIN32}>:NOMINMAX>
# Exclude some headers when including Windows.h
$<$<BOOL:${WIN32}>:WIN32_LEAN_AND_MEAN>
)
set(_c2_qt_defs
@@ -1241,9 +1245,6 @@ if (MSVC)
-Wno-missing-designated-field-initializers
)
endif()
# Disable min/max macros from Windows.h
target_compile_definitions(${LIBRARY_PROJECT} PUBLIC NOMINMAX)
else ()
target_compile_options(${LIBRARY_PROJECT} PUBLIC
-Wall