diff options
author | kcat <[email protected]> | 2016-11-02 16:09:23 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2016-11-02 16:09:23 -0700 |
commit | c8ce33d5bd36364fd645c1bfd311a6b524c314ed (patch) | |
tree | 95ba9e648822b22966a5991386ffbc011dcfa3af /cmake/FindDSound.cmake | |
parent | 43e7323adba756ca96abef2e69a09461c8e1e633 (diff) | |
parent | ac26b209a6c3e19a85e3ca960c29f49939aa73bc (diff) |
Merge pull request #78 from septag/cmake-dsound
Added cmake support for dsound and windows 8/10 SDKs
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}) |