summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-03-01 01:39:42 -0800
committerChris Robinson <[email protected]>2008-03-01 01:39:42 -0800
commit2af549880412bb666574945a81ea6fbcba82f324 (patch)
treeb3e5b17e9471926cf95128450792d0fc0012ce58 /CMakeLists.txt
parent2b42d7fdb8181ae5c721e86cc9bf5896e546cc02 (diff)
Define _WIN32_WINNT to 0x0500 when including windows.h
VC7 appears to require that value, or higher, set and fails otherwise
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25e4e879..f2af7e7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -149,7 +149,7 @@ IF(DLOPEN)
ENDIF()
# Check if we have Windows headers
-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
+CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H -D_WIN32_WINNT=0x0500)
IF(NOT HAVE_WINDOWS_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
IF(NOT HAVE_GETTIMEOFDAY)
@@ -180,7 +180,8 @@ ENDIF()
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
IF(NOT HAVE_STDINT_H)
IF(HAVE_WINDOWS_H)
- CHECK_C_SOURCE_COMPILES("\#include <windows.h>
+ CHECK_C_SOURCE_COMPILES("\#define _WIN32_WINNT 0x0500
+ \#include <windows.h>
__int64 foo;
int main() {return 0;}" HAVE___INT64)
ENDIF()
@@ -264,7 +265,7 @@ IF(HAVE_WINDOWS_H)
ENDIF()
ENDIF()
IF(WINMM)
- CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
+ CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0500)
IF(HAVE_MMSYSTEM_H)
SET(HAVE_WINMM 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/winmm.c)