summaryrefslogtreecommitdiffstats
path: root/Source/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-17 14:43:26 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-17 14:48:28 (GMT)
commit27591a541c3ee7c0a941295f25610631bf18ca74 (patch)
tree5f91e2da8e66d733cc543a04ed8a197e3830190c /Source/CMakeLists.txt
parent481c9003fa41e75731bc463cdfa4310e91d5ea4c (diff)
downloadCMake-27591a541c3ee7c0a941295f25610631bf18ca74.zip
CMake-27591a541c3ee7c0a941295f25610631bf18ca74.tar.gz
CMake-27591a541c3ee7c0a941295f25610631bf18ca74.tar.bz2
Define WIN32_LEAN_AND_MEAN for CMake sources on Windows
This reduces APIs included by `windows.h`. We can include the headers for those APIs as needed.
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r--Source/CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index b68675d..e63bf5a 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -45,9 +45,12 @@ endif()
set(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
-# ensure Unicode friendly APIs are used on Windows
if(WIN32)
+ # ensure Unicode friendly APIs are used on Windows
add_definitions(-DUNICODE -D_UNICODE)
+
+ # minimize windows.h content
+ add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
# configure the .dox.in file