From 99b55bc2301d04bd7b078d78a60c628ef5964fa0 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 10 Jul 2019 20:06:50 -0700 Subject: Add the Windows SDK for the winmm library path --- CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3