From 01be03834d3cfc9524c802bff6b0be801e18b598 Mon Sep 17 00:00:00 2001
From: Erik Faye-Lund <erik.faye-lund@collabora.com>
Date: Thu, 28 Apr 2022 15:44:21 +0200
Subject: [PATCH] cmake: do not force inclusion of windows.h

While it's true that nobody loves to include windows.h, we now have
gl_wrap.h where we can do this automatically. This saves us from
including windows.h in util sources etc, which makes things a tiny bit
more sane.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
---
 CMakeLists.txt | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c65105025..0b2191b33 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,21 +75,6 @@ if (CMAKE_COMPILER_IS_GNUCC)
 endif ()
 
 if (WIN32)
-	# Nobody likes to include windows.h:
-	# - Microsoft's GL/gl.h header depends on windows.h but doesn't include it;
-	# - certain GLUT distributions don't include it;
-	# - most of our programs are meant to be portable so don't include it.
-	#
-	# We could try to replicate the windows.h definitions required by
-	# GL/gl.h, but the build time savings don't compensate the constant
-	# headaches that brings, so instead we force windows.h to be included
-	# on every file.
-	if (MSVC)
-		add_definitions (-FIwindows.h)
-	else (MSVC)
-		add_definitions (--include windows.h)
-	endif (MSVC)
-
 	# Don't define min/max macros
 	add_definitions (-DNOMINMAX)
 
-- 
GitLab