Linux multi-monitor fullscreen support
[ryzomcore.git] / CMakeModules / FindDSound.cmake
blobdde5212ab82ef2f55355d5b8d780435d7ec1471c
1 # - Find DirectSound\r
2 # Find the DirectSound includes and libraries\r
3 #\r
4 #  DSOUND_INCLUDE_DIR - where to find dsound.h\r
5 #  DSOUND_LIBRARIES   - List of libraries when using dsound.\r
6 #  DSOUND_FOUND       - True if dsound found.\r
7 \r
8 if(DSOUND_INCLUDE_DIR)\r
9     # Already in cache, be silent\r
10     set(DSOUND_FIND_QUIETLY TRUE)\r
11 ENDIF()\r
13 find_path(DSOUND_INCLUDE_DIR dsound.h \r
14   "$ENV{DXSDK_DIR}" \r
15   "$ENV{DXSDK_DIR}/Include"\r
16 )\r
18 find_library(DSOUND_LIBRARY dsound\r
19   "$ENV{DXSDK_DIR}"\r
20   "$ENV{DXSDK_DIR}/Lib"\r
21   "$ENV{DXSDK_DIR}/Lib/x86"\r
22 )\r
24 # Handle the QUIETLY and REQUIRED arguments and set DSOUND_FOUND to TRUE if\r
25 # all listed variables are TRUE.\r
26 include(FindPackageHandleStandardArgs)\r
27 find_package_handle_standard_args(DSOUND DEFAULT_MSG\r
28     DSOUND_INCLUDE_DIR DSOUND_LIBRARY)\r
30 if(DSOUND_FOUND)\r
31     set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})\r
32 ELSE()\r
33     set(DSOUND_LIBRARIES)\r
34 ENDIF()\r
36 mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)\r