2 # Find the DirectX includes and libraries
\r
4 # DXSDK_INCLUDE_DIR - where to find baseinterface.h
\r
5 # DXSDK_LIBRARIES - List of libraries when using 3DSMAX.
\r
6 # DXSDK_FOUND - True if MAX SDK found.
\r
9 # Already in cache, be silent
\r
10 SET(DXSDK_FIND_QUIETLY TRUE)
\r
14 "Include/dxsdkver.h"
\r
17 "C:/Program Files (x86)/Microsoft DirectX SDK (June 2010)"
\r
18 "C:/Program Files/Microsoft DirectX SDK (June 2010)"
\r
19 "C:/Program Files (x86)/Microsoft DirectX SDK (February 2010)"
\r
20 "C:/Program Files/Microsoft DirectX SDK (February 2010)"
\r
21 "C:/Program Files (x86)/Microsoft DirectX SDK (November 2007)"
\r
22 "C:/Program Files/Microsoft DirectX SDK (November 2007)"
\r
23 "C:/Program Files (x86)/Microsoft DirectX SDK"
\r
24 "C:/Program Files/Microsoft DirectX SDK"
\r
27 MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
\r
28 FIND_LIBRARY(${MYLIBRARY}
\r
29 NAMES ${MYLIBRARYNAME}
\r
31 "${DXSDK_LIBRARY_DIR}"
\r
36 SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include")
\r
39 SET(DXSDK_LIBRARY_DIRS ${DXSDK_DIR}/Lib/x64 ${DXSDK_DIR}/lib/amd64)
\r
41 SET(DXSDK_LIBRARY_DIRS ${DXSDK_DIR}/Lib/x86 ${DXSDK_DIR}/lib)
\r
44 FIND_PATH(DXSDK_LIBRARY_DIR
\r
47 ${DXSDK_LIBRARY_DIRS})
\r
49 FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid)
\r
50 FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8)
\r
51 FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound)
\r
52 FIND_DXSDK_LIBRARY(DXSDK_XAUDIO_LIBRARY x3daudio)
\r
53 FIND_DXSDK_LIBRARY(DXSDK_D3DX9_LIBRARY d3dx9)
\r
54 FIND_DXSDK_LIBRARY(DXSDK_D3D9_LIBRARY d3d9)
\r
57 # Handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
\r
58 # all listed variables are TRUE.
\r
59 INCLUDE(FindPackageHandleStandardArgs)
\r
61 FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectXSDK DEFAULT_MSG DXSDK_DIR DXSDK_GUID_LIBRARY DXSDK_DINPUT_LIBRARY)
\r
63 MARK_AS_ADVANCED(DXSDK_INCLUDE_DIR
\r
65 DXSDK_DINPUT_LIBRARY
\r
66 DXSDK_DSOUND_LIBRARY
\r
67 DXSDK_XAUDIO_LIBRARY
\r