From 7e1295df9a73e1fd629e5873a7c1d35a5350b4d9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 16 Nov 2008 04:39:12 -0800 Subject: DirectSound is not explicitly dependant on windows.h --- CMakeLists.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index ce9b34e2..26e6f79c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,23 +280,23 @@ IF(SOLARIS) ENDIF() # Check DSound/MMSystem backend -IF(HAVE_WINDOWS_H) - IF(DSOUND) - CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H) - IF(HAVE_DSOUND_H) - SET(HAVE_DSOUND 1) - SET(ALC_OBJS ${ALC_OBJS} Alc/dsound.c) - SET(BACKENDS "${BACKENDS} DirectSound,") - - SET(CMAKE_REQUIRED_LIBRARIES dsound) - CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBDSOUND) - SET(CMAKE_REQUIRED_LIBRARIES "") -# CHECK_LIBRARY_EXISTS(dsound DirectSoundCreate "" HAVE_LIBDSOUND) - IF(HAVE_LIBDSOUND) - SET(EXTRA_LIBS dsound ${EXTRA_LIBS}) - ENDIF() +IF(DSOUND) + CHECK_INCLUDE_FILE(dsound.h HAVE_DSOUND_H) + IF(HAVE_DSOUND_H) + SET(HAVE_DSOUND 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/dsound.c) + SET(BACKENDS "${BACKENDS} DirectSound,") + + SET(CMAKE_REQUIRED_LIBRARIES dsound) + CHECK_C_SOURCE_COMPILES("int main() {return 0;}" HAVE_LIBDSOUND) + SET(CMAKE_REQUIRED_LIBRARIES "") +# CHECK_LIBRARY_EXISTS(dsound DirectSoundCreate "" HAVE_LIBDSOUND) + IF(HAVE_LIBDSOUND) + SET(EXTRA_LIBS dsound ${EXTRA_LIBS}) ENDIF() ENDIF() +ENDIF() +IF(HAVE_WINDOWS_H) IF(WINMM) CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0500) IF(HAVE_MMSYSTEM_H) -- cgit v1.2.3