aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21846be1..cf10bc20 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -938,12 +938,22 @@ 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)
+ SET(WINSDK_LIB_DIRS )
+ SET(WINSDK_INCLUDE_DIRS )
+ FIND_PACKAGE(WindowsSDK)
+ IF(WINDOWSSDK_FOUND)
+ get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS)
+ get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS)
+ ENDIF()
+
SET(OLD_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS})
SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_WIN32_WINNT=0x0502)
# Check MMSystem backend
CHECK_INCLUDE_FILES("windows.h;mmsystem.h" HAVE_MMSYSTEM_H)
- FIND_LIBRARY(WINMM_LIBRARY NAMES winmm)
+ FIND_LIBRARY(WINMM_LIBRARY NAMES winmm
+ PATHS ${WINSDK_LIB_DIRS}
+ PATH_SUFFIXES lib lib/x86 lib/x64)
IF(HAVE_MMSYSTEM_H AND WINMM_LIBRARY)
OPTION(ALSOFT_BACKEND_WINMM "Enable Windows Multimedia backend" ON)
IF(ALSOFT_BACKEND_WINMM)