diff options
author | Sven Gothel <[email protected]> | 2019-04-07 23:39:04 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-04-07 23:39:04 +0200 |
commit | 73233ce69919fc19c53ce8663c5b8cc05227f07e (patch) | |
tree | f2b6ccc1a14d7c387f33398a44ea4511d7ecb212 /cmake/FindDSound.cmake | |
parent | 8efa4c7ba5ee8eb399d31a9884e45f743d4625ad (diff) | |
parent | 99a55c445211fea77af6ab61cbc6a6ec4fbdc9b9 (diff) |
Merge branch 'v1.19' of git://repo.or.cz/openal-soft into v1.19v1.19
Diffstat (limited to 'cmake/FindDSound.cmake')
-rw-r--r-- | cmake/FindDSound.cmake | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/cmake/FindDSound.cmake b/cmake/FindDSound.cmake index 0ddf98aa..4078deb5 100644 --- a/cmake/FindDSound.cmake +++ b/cmake/FindDSound.cmake @@ -8,24 +8,30 @@ # DSOUND_LIBRARY - the dsound library # +if (WIN32) + include(FindWindowsSDK) + if (WINDOWSSDK_FOUND) + get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS) + get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS) + endif() +endif() + +# DSOUND_INCLUDE_DIR find_path(DSOUND_INCLUDE_DIR - NAMES dsound.h - PATHS "${DXSDK_DIR}" + NAMES "dsound.h" + PATHS "${DXSDK_DIR}" ${WINSDK_INCLUDE_DIRS} PATH_SUFFIXES include - DOC "The DirectSound include directory" -) + DOC "The DirectSound include directory") +# DSOUND_LIBRARY find_library(DSOUND_LIBRARY NAMES dsound - PATHS "${DXSDK_DIR}" + PATHS "${DXSDK_DIR}" ${WINSDK_LIB_DIRS} PATH_SUFFIXES lib lib/x86 lib/x64 - DOC "The DirectSound library" -) + DOC "The DirectSound library") include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(DSound - REQUIRED_VARS DSOUND_LIBRARY DSOUND_INCLUDE_DIR -) +find_package_handle_standard_args(DSound REQUIRED_VARS DSOUND_LIBRARY DSOUND_INCLUDE_DIR) if(DSOUND_FOUND) set(DSOUND_LIBRARIES ${DSOUND_LIBRARY}) |