🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

  1. # - Find DirectSound includes and libraries
  2. #
  3. # DSOUND_FOUND - True if DSOUND_INCLUDE_DIR & DSOUND_LIBRARY are found
  4. # DSOUND_LIBRARIES - Set when DSOUND_LIBRARY is found
  5. # DSOUND_INCLUDE_DIRS - Set when DSOUND_INCLUDE_DIR is found
  6. #
  7. # DSOUND_INCLUDE_DIR - where to find dsound.h, etc.
  8. # DSOUND_LIBRARY - the dsound library
  9. #
  10. if (WIN32)
  11. include(FindWindowsSDK)
  12. if (WINDOWSSDK_FOUND)
  13. get_windowssdk_library_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_LIB_DIRS)
  14. get_windowssdk_include_dirs(${WINDOWSSDK_PREFERRED_DIR} WINSDK_INCLUDE_DIRS)
  15. endif()
  16. endif()
  17. # DSOUND_INCLUDE_DIR
  18. find_path(DSOUND_INCLUDE_DIR
  19. NAMES "dsound.h"
  20. PATHS "${DXSDK_DIR}" ${WINSDK_INCLUDE_DIRS}
  21. PATH_SUFFIXES include
  22. DOC "The DirectSound include directory")
  23. # DSOUND_LIBRARY
  24. find_library(DSOUND_LIBRARY
  25. NAMES dsound
  26. PATHS "${DXSDK_DIR}" ${WINSDK_LIB_DIRS}
  27. PATH_SUFFIXES lib lib/x86 lib/x64
  28. DOC "The DirectSound library")
  29. include(FindPackageHandleStandardArgs)
  30. find_package_handle_standard_args(DSound REQUIRED_VARS DSOUND_LIBRARY DSOUND_INCLUDE_DIR)
  31. if(DSOUND_FOUND)
  32. set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
  33. set(DSOUND_INCLUDE_DIRS ${DSOUND_INCLUDE_DIR})
  34. endif()
  35. mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)