aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/FindDSound.cmake
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-01-18 04:03:16 -0800
committerChris Robinson <[email protected]>2021-01-19 17:19:44 -0800
commit13698362f1726326ab60180b04a86df79b518614 (patch)
tree49721d9c6e0fdf562fb07bdb70812f5e724129e3 /cmake/FindDSound.cmake
parentc3380d42011738ed91e356206532908403f337e4 (diff)
Avoid explicitly searching for the WindowsSDK
It's causing problems with various setups. So instead we'll have to assume some things for Windows (namely that winmm exists, and if dsound isn't in DXSDK_DIR, it needs to be in the compiler's default paths to be usable).
Diffstat (limited to 'cmake/FindDSound.cmake')
-rw-r--r--cmake/FindDSound.cmake41
1 files changed, 0 insertions, 41 deletions
diff --git a/cmake/FindDSound.cmake b/cmake/FindDSound.cmake
deleted file mode 100644
index ecd36078..00000000
--- a/cmake/FindDSound.cmake
+++ /dev/null
@@ -1,41 +0,0 @@
-# - Find DirectSound includes and libraries
-#
-# DSOUND_FOUND - True if DSOUND_INCLUDE_DIR & DSOUND_LIBRARY are found
-# DSOUND_LIBRARIES - Set when DSOUND_LIBRARY is found
-# DSOUND_INCLUDE_DIRS - Set when DSOUND_INCLUDE_DIR is found
-#
-# DSOUND_INCLUDE_DIR - where to find dsound.h, etc.
-# DSOUND_LIBRARY - the dsound library
-#
-
-if (WIN32)
- 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()
-endif()
-
-# DSOUND_INCLUDE_DIR
-find_path(DSOUND_INCLUDE_DIR
- NAMES "dsound.h"
- PATHS "${DXSDK_DIR}" ${WINSDK_INCLUDE_DIRS}
- PATH_SUFFIXES include
- DOC "The DirectSound include directory")
-
-# DSOUND_LIBRARY
-find_library(DSOUND_LIBRARY
- NAMES dsound
- PATHS "${DXSDK_DIR}" ${WINSDK_LIB_DIRS}
- PATH_SUFFIXES lib lib/x86 lib/x64
- DOC "The DirectSound library")
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(DSound REQUIRED_VARS DSOUND_LIBRARY DSOUND_INCLUDE_DIR)
-
-if(DSOUND_FOUND)
- set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
- set(DSOUND_INCLUDE_DIRS ${DSOUND_INCLUDE_DIR})
-endif()
-
-mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)