summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-15 12:25:51 -0800
committerChris Robinson <[email protected]>2008-01-15 12:25:51 -0800
commitfe925ada59e21c14ae3508a644a8b3087e079116 (patch)
treed64c72a6cb3cb9baf1ee7d41a91ab2b405643925 /CMakeLists.txt
parentb6596f38b963cd41c014e3aa08ab7dbd3bc5205a (diff)
Fix use of variables in checks
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt66
1 files changed, 33 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 966b6c23..d8556873 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,7 +46,7 @@ IF(NOT CMAKE_BUILD_TYPE)
FORCE)
ENDIF()
-IF("${MSVC}")
+IF(MSVC)
# ???
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -D_DEBUG")
SET(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -DNDEBUG")
@@ -84,7 +84,7 @@ ELSE()
ENDIF()
# Set visibility options if available
- IF(NOT "${WIN32}")
+ IF(NOT WIN32)
CHECK_C_SOURCE_COMPILES("int foo() __attribute__((destructor));
int main() {return 0;}" HAVE_GCC_DESTRUCTOR)
@@ -101,15 +101,15 @@ ENDIF()
CHECK_LIBRARY_EXISTS(m sqrtf "" HAVE_SQRTF)
-IF("${HAVE_SQRTF}")
+IF(HAVE_SQRTF)
SET(EXTRA_LIBS m ${EXTRA_LIBS})
ENDIF()
CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
CHECK_FUNCTION_EXISTS(strcasecmp HAVE_STRCASECMP)
-IF(NOT "${HAVE_STRCASECMP}")
+IF(NOT HAVE_STRCASECMP)
CHECK_FUNCTION_EXISTS(_stricmp HAVE__STRICMP)
- IF(NOT "${HAVE__STRICMP}")
+ IF(NOT HAVE__STRICMP)
MESSAGE(FATAL_ERROR "No case-insensitive compare function found, please report!")
ENDIF()
@@ -117,9 +117,9 @@ IF(NOT "${HAVE_STRCASECMP}")
ENDIF()
CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP)
-IF(NOT "${HAVE_STRNCASECMP}")
+IF(NOT HAVE_STRNCASECMP)
CHECK_FUNCTION_EXISTS(_strnicmp HAVE__STRNICMP)
- IF(NOT "${HAVE__STRNICMP}")
+ IF(NOT HAVE__STRNICMP)
MESSAGE(FATAL_ERROR "No case-insensitive size-limitted compare function found, please report!")
ENDIF()
@@ -127,9 +127,9 @@ IF(NOT "${HAVE_STRNCASECMP}")
ENDIF()
CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF)
-IF(NOT "${HAVE_SNPRINTF}")
+IF(NOT HAVE_SNPRINTF)
CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF)
- IF(NOT "${HAVE__SNPRINTF}")
+ IF(NOT HAVE__SNPRINTF)
MESSAGE(FATAL_ERROR "No snprintf function found, please report!")
ENDIF()
@@ -139,9 +139,9 @@ ENDIF()
# Check for the dlopen API (for dynamicly loading backend libs)
IF(DLOPEN)
CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
- IF("${HAVE_DLFCN_H}")
+ IF(HAVE_DLFCN_H)
CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
- IF("${HAVE_LIBDL}")
+ IF(HAVE_LIBDL)
SET(EXTRA_LIBS dl ${EXTRA_LIBS})
ENDIF()
ENDIF()
@@ -149,20 +149,20 @@ ENDIF()
# Check if we have Windows headers
CHECK_INCLUDE_FILE(windows.h HAVE_WINDOWS_H)
-IF(NOT "${HAVE_WINDOWS_H}")
+IF(NOT HAVE_WINDOWS_H)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
- IF(NOT "${HAVE_GETTIMEOFDAY}")
+ IF(NOT HAVE_GETTIMEOFDAY)
MESSAGE(FATAL_ERROR "No timing function found!")
ENDIF()
CHECK_FUNCTION_EXISTS(nanosleep HAVE_NANOSLEEP)
- IF(NOT "${HAVE_NANOSLEEP}")
+ IF(NOT HAVE_NANOSLEEP)
MESSAGE(FATAL_ERROR "No sleep function found!")
ENDIF()
# We need pthreads outside of Windows
CHECK_INCLUDE_FILE(pthread.h HAVE_PTHREAD_H)
- IF(NOT "${HAVE_PTHREAD_H}")
+ IF(NOT HAVE_PTHREAD_H)
MESSAGE(FATAL_ERROR "PThreads is required for non-Windows builds!")
ENDIF()
@@ -170,22 +170,22 @@ IF(NOT "${HAVE_WINDOWS_H}")
# _REENTRANT is needed for libc thread-safety
ADD_DEFINITIONS(-D_GNU_SOURCE=1 -D_REENTRANT)
CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_LIBPTHREAD)
- IF("${HAVE_LIBPTHREAD}")
+ IF(HAVE_LIBPTHREAD)
SET(EXTRA_LIBS pthread ${EXTRA_LIBS})
ENDIF()
ENDIF()
# Check for a 64-bit type
CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H)
-IF(NOT "${HAVE_STDINT_H}")
- IF("${HAVE_WINDOWS_H}")
+IF(NOT HAVE_STDINT_H)
+ IF(HAVE_WINDOWS_H)
CHECK_C_SOURCE_COMPILES("\#include <windows.h>
__int64 foo;
int main() {return 0;}" HAVE___INT64)
ENDIF()
- IF(NOT "${HAVE___INT64}")
- IF(NOT "${SIZEOF_LONG}" MATCHES "8")
- IF(NOT "${SIZEOF_LONG_LONG}" MATCHES "8")
+ IF(NOT HAVE___INT64)
+ IF(NOT SIZEOF_LONG MATCHES "8")
+ IF(NOT SIZEOF_LONG_LONG MATCHES "8")
MESSAGE(FATAL_ERROR "No 64-bit types found, please report!")
ENDIF()
ENDIF()
@@ -219,12 +219,12 @@ SET(BACKENDS "")
# Check ALSA backend
IF(ALSA)
CHECK_INCLUDE_FILE(alsa/asoundlib.h HAVE_ALSA_ASOUNDLIB_H)
- IF("${HAVE_ALSA_ASOUNDLIB_H}")
+ IF(HAVE_ALSA_ASOUNDLIB_H)
CHECK_LIBRARY_EXISTS(asound snd_pcm_open "" HAVE_LIBASOUND)
- IF("${HAVE_DLFCN_H}" OR "${HAVE_LIBASOUND}")
+ IF(HAVE_DLFCN_H OR HAVE_LIBASOUND)
SET(HAVE_ALSA 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/alsa.c)
- IF("${HAVE_DLFCN_H}")
+ IF(HAVE_DLFCN_H)
SET(BACKENDS ${BACKENDS} ALSA)
ELSE()
SET(BACKENDS ${BACKENDS} ALSA\(linked\))
@@ -237,7 +237,7 @@ ENDIF()
# Check OSS backend
IF(OSS)
CHECK_INCLUDE_FILE(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
- IF("${HAVE_SYS_SOUNDCARD_H}")
+ IF(HAVE_SYS_SOUNDCARD_H)
SET(HAVE_OSS 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/oss.c)
SET(BACKENDS ${BACKENDS} OSS)
@@ -245,31 +245,31 @@ IF(OSS)
ENDIF()
# Check DSound/MMSystem backend
-IF("${HAVE_WINDOWS_H}")
+IF(HAVE_WINDOWS_H)
SET(CMAKE_REQUIRED_LIBRARIES ole32)
CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBOLE32)
SET(CMAKE_REQUIRED_LIBRARIES "")
# CHECK_LIBRARY_EXISTS(ole32 CoInitialize "" HAVE_LIBOLE32)
- IF("${HAVE_LIBOLE32}")
+ IF(HAVE_LIBOLE32)
SET(EXTRA_LIBS ole32 ${EXTRA_LIBS})
ENDIF()
IF(DSOUND)
CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H)
- IF("${HAVE_DSOUND_H}")
+ IF(HAVE_DSOUND_H)
SET(HAVE_DSOUND 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/dsound.c)
SET(BACKENDS ${BACKENDS} DirectSound)
CHECK_LIBRARY_EXISTS(dxguid IID_IDirectSound "" HAVE_LIBDXGUID)
- IF("${HAVE_LIBDXGUID}")
+ IF(HAVE_LIBDXGUID)
SET(EXTRA_LIBS dxguid ${EXTRA_LIBS})
ENDIF()
ENDIF()
ENDIF()
IF(WINMM)
CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
- IF("${HAVE_MMSYSTEM_H}")
+ IF(HAVE_MMSYSTEM_H)
SET(HAVE_WINMM 1)
SET(ALC_OBJS ${ALC_OBJS} Alc/winmm.c)
SET(BACKENDS ${BACKENDS} WinMM)
@@ -278,7 +278,7 @@ IF("${HAVE_WINDOWS_H}")
CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBWINMM)
SET(CMAKE_REQUIRED_LIBRARIES "")
# CHECK_LIBRARY_EXISTS(winmm waveInOpen "" HAVE_LIBWINMM)
- IF("${HAVE_LIBWINMM}")
+ IF(HAVE_LIBWINMM)
SET(EXTRA_LIBS winmm ${EXTRA_LIBS})
ENDIF()
ENDIF()
@@ -296,7 +296,7 @@ CONFIGURE_FILE(
ADD_DEFINITIONS(-DAL_BUILD_LIBRARY)
# Build a shared library
-IF("${WIN32}")
+IF(WIN32)
SET(LIBNAME openal32)
ELSE()
SET(LIBNAME openal)
@@ -305,7 +305,7 @@ ENDIF()
ADD_LIBRARY(${LIBNAME} SHARED ${OPENAL_OBJS} ${ALC_OBJS})
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES VERSION ${LIB_VERSION}
SOVERSION ${LIB_MAJOR_VERSION})
-IF("${WIN32}")
+IF(WIN32)
SET_TARGET_PROPERTIES(${LIBNAME} PROPERTIES PREFIX "")
ENDIF()