aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-28 15:22:58 -0700
committerChris Robinson <[email protected]>2019-07-28 15:22:58 -0700
commit12e179d53952f2820250049ee4f87495944e714e (patch)
treebba75f5a4708a2c6d0d5ffa25023a659f9a1d66c /CMakeLists.txt
parent585d965c921453e9097ada09ec63c67149aa6d72 (diff)
Remove some unnecessary header checks
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 5 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 258a05af..5d274626 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -414,13 +414,9 @@ CHECK_C_SOURCE_COMPILES("int foo(const char *str, ...) __attribute__((format(pri
CHECK_INCLUDE_FILE(malloc.h HAVE_MALLOC_H)
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
-CHECK_INCLUDE_FILE(strings.h HAVE_STRINGS_H)
CHECK_INCLUDE_FILE(cpuid.h HAVE_CPUID_H)
CHECK_INCLUDE_FILE(intrin.h HAVE_INTRIN_H)
CHECK_INCLUDE_FILE(sys/sysconf.h HAVE_SYS_SYSCONF_H)
-CHECK_INCLUDE_FILE(fenv.h HAVE_FENV_H)
-CHECK_INCLUDE_FILE(float.h HAVE_FLOAT_H)
-CHECK_INCLUDE_FILE(ieeefp.h HAVE_IEEEFP_H)
CHECK_INCLUDE_FILE(guiddef.h HAVE_GUIDDEF_H)
IF(NOT HAVE_GUIDDEF_H)
CHECK_INCLUDE_FILE(initguid.h HAVE_INITGUID_H)
@@ -505,14 +501,7 @@ IF(NOT HAVE_STRNCASECMP)
ENDIF()
-# Check if we have Windows headers
-SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
-SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0502)
-CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
-SET(CMAKE_REQUIRED_DEFINITIONS ${OLD_REQUIRED_DEFINITIONS})
-UNSET(OLD_REQUIRED_DEFINITIONS)
-
-IF(NOT HAVE_WINDOWS_H)
+IF(NOT WIN32)
CHECK_SYMBOL_EXISTS(gettimeofday sys/time.h HAVE_GETTIMEOFDAY)
IF(NOT HAVE_GETTIMEOFDAY)
MESSAGE(FATAL_ERROR "No timing function found!")
@@ -606,12 +595,9 @@ ENDIF()
CHECK_SYMBOL_EXISTS(getopt unistd.h HAVE_GETOPT)
# Check for a 64-bit type
-CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
-IF(NOT HAVE_STDINT_H)
- IF(NOT SIZEOF_LONG MATCHES "8")
- IF(NOT SIZEOF_LONG_LONG MATCHES "8")
- MESSAGE(FATAL_ERROR "No 64-bit types found, please report!")
- ENDIF()
+IF(NOT SIZEOF_LONG MATCHES "8")
+ IF(NOT SIZEOF_LONG_LONG MATCHES "8")
+ MESSAGE(FATAL_ERROR "No 64-bit type found, please report!")
ENDIF()
ENDIF()
@@ -929,7 +915,7 @@ ENDIF()
OPTION(ALSOFT_REQUIRE_WINMM "Require Windows Multimedia backend" OFF)
OPTION(ALSOFT_REQUIRE_DSOUND "Require DirectSound backend" OFF)
OPTION(ALSOFT_REQUIRE_WASAPI "Require WASAPI backend" OFF)
-IF(HAVE_WINDOWS_H)
+IF(WIN32)
SET(WINSDK_LIB_DIRS )
SET(WINSDK_INCLUDE_DIRS )
FIND_PACKAGE(WindowsSDK)