aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-07-10 20:06:50 -0700
committerChris Robinson <[email protected]>2019-07-10 20:06:50 -0700
commit99b55bc2301d04bd7b078d78a60c628ef5964fa0 (patch)
tree557dd1e24b023d514332db233563d50576276050 /CMakeLists.txt
parent93d0c8993d22f5944efdca64b1b1905a479a19dc (diff)
Add the Windows SDK for the winmm library path
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)