diff options
author | Chris Robinson <[email protected]> | 2014-04-19 08:50:41 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-19 08:50:41 -0700 |
commit | 043e25b6024119c28eb8d6d4f057ab01847a3b95 (patch) | |
tree | 7fa4caf7c2c4f056e43a28eb49ab2884c40a9a3f | |
parent | 96c559fbefd3a98068ac9e1ff66b88278d8ed8a2 (diff) |
Don't link with libwinmm unless WinMM is enabled
We don't use timeGetTime for timing anymore, so winmm only needs to be linked
when the winmm backend is enabled.
-rw-r--r-- | CMakeLists.txt | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ea058b70..68a58cae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,13 +492,6 @@ IF(NOT HAVE_STDINT_H) ENDIF() ENDIF() -# Windows needs winmm for timeGetTime, even if the backend is disabled -CHECK_SHARED_FUNCTION_EXISTS(timeGetTime "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) -IF(HAVE_LIBWINMM) - SET(EXTRA_LIBS winmm ${EXTRA_LIBS}) - SET(PKG_CONFIG_LIBS ${PKG_CONFIG_LIBS} -lwinmm) -ENDIF() - SET(OPENAL_OBJS OpenAL32/alAuxEffectSlot.c OpenAL32/alBuffer.c @@ -764,10 +757,14 @@ ENDIF() IF(HAVE_WINDOWS_H) IF(ALSOFT_BACKEND_WINMM) CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H -D_WIN32_WINNT=0x0502) - IF(HAVE_MMSYSTEM_H AND HAVE_LIBWINMM) - SET(HAVE_WINMM 1) - SET(ALC_OBJS ${ALC_OBJS} Alc/backends/winmm.c) - SET(BACKENDS "${BACKENDS} WinMM,") + IF(HAVE_MMSYSTEM_H) + CHECK_SHARED_FUNCTION_EXISTS(waveOutOpen "windows.h;mmsystem.h" winmm "" HAVE_LIBWINMM) + IF(HAVE_LIBWINMM) + SET(HAVE_WINMM 1) + SET(ALC_OBJS ${ALC_OBJS} Alc/backends/winmm.c) + SET(BACKENDS "${BACKENDS} WinMM,") + SET(EXTRA_LIBS winmm ${EXTRA_LIBS}) + ENDIF() ENDIF() ENDIF() ENDIF() |