aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-04-25 09:02:50 +0100
committerJosé Fonseca <jfonseca@vmware.com>2012-04-25 09:02:50 +0100
commit01d7bb4f7caa7329ed93961a0d8d22587d829bad (patch)
tree8a01366d5c6a36f2d6720a1d154f12708824851b
parent7b67827201030d66233366f24dd4d8795e5e4294 (diff)
downloadpiglit-01d7bb4f7caa7329ed93961a0d8d22587d829bad.tar.gz
cmake: Define WIN32_LEAN_AND_MEAN for the whole project.
This avoids namespace pollution when including windows.h, and we don't really need use or need the whole lot of headers that get included by windows.h. In particular, this fixes failure to build ext_framebuffer_multisample accuracy test on windows because some obscure Windows headers define "small" as "char".
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 581a8139..8ae6eb92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -114,6 +114,10 @@ if (WIN32)
# MSVC & MinGW only define & use APIENTRY
add_definitions (-DGLAPIENTRY=__stdcall)
+ # Avoid namespace pollution when including windows.h
+ # http://support.microsoft.com/kb/166474
+ add_definitions (-DWIN32_LEAN_AND_MEAN=1)
+
# Don't define min/max macros
add_definitions (-DNOMINMAX)