diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 784713d2..f74dcd20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -289,16 +289,17 @@ 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}) + CHECK_LIBRARY_EXISTS(dsound DirectSoundCreate "" HAVE_LIBDSOUND) + IF(HAVE_LIBDSOUND OR WIN32) + SET(HAVE_DSOUND 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/dsound.c) + + IF(WIN32) + SET(BACKENDS "${BACKENDS} DirectSound,") + ELSE() + SET(BACKENDS "${BACKENDS} DirectSound \(linked\),") + SET(EXTRA_LIBS dsound ${EXTRA_LIBS}) + ENDIF() ENDIF() ENDIF() ENDIF() |