Fixed: DirectX SDK 64bits directory
This commit is contained in:
parent
c5bf133d4f
commit
aa930a40cd
1 changed files with 38 additions and 34 deletions
|
@ -5,57 +5,61 @@
|
||||||
# DXSDK_LIBRARIES - List of libraries when using 3DSMAX.
|
# DXSDK_LIBRARIES - List of libraries when using 3DSMAX.
|
||||||
# DXSDK_FOUND - True if MAX SDK found.
|
# DXSDK_FOUND - True if MAX SDK found.
|
||||||
|
|
||||||
if(DXSDK_INCLUDE_DIR)
|
IF(DXSDK_DIR)
|
||||||
# Already in cache, be silent
|
# Already in cache, be silent
|
||||||
set(DXSDK_FIND_QUIETLY TRUE)
|
SET(DXSDK_FIND_QUIETLY TRUE)
|
||||||
endif(DXSDK_INCLUDE_DIR)
|
ENDIF(DXSDK_DIR)
|
||||||
|
|
||||||
find_path(DXSDK_INCLUDE_DIR dxsdkver.h
|
FIND_PATH(DXSDK_DIR
|
||||||
|
"Include/dxsdkver.h"
|
||||||
PATHS
|
PATHS
|
||||||
"$ENV{DXSDK_DIR}"
|
"$ENV{DXSDK_DIR}"
|
||||||
"$ENV{DXSDK_DIR}/Include"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
MACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||||
FIND_LIBRARY(${MYLIBRARY}
|
FIND_LIBRARY(${MYLIBRARY}
|
||||||
NAMES ${MYLIBRARYNAME}
|
NAMES ${MYLIBRARYNAME}
|
||||||
PATHS
|
PATHS
|
||||||
|
"${DXSDK_LIBRARY_DIR}"
|
||||||
"$ENV{DXSDK_DIR}"
|
"$ENV{DXSDK_DIR}"
|
||||||
"$ENV{DXSDK_DIR}/Lib"
|
"$ENV{DXSDK_DIR}/Lib"
|
||||||
"$ENV{DXSDK_DIR}/Lib/x86"
|
"$ENV{DXSDK_DIR}/Lib/x86"
|
||||||
)
|
)
|
||||||
ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
||||||
|
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid)
|
IF(DXSDK_DIR)
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8)
|
SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include")
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound)
|
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_XAUDIO_LIBRARY x3daudio)
|
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_D3DX9_LIBRARY d3dx9)
|
|
||||||
FIND_DXSDK_LIBRARY(DXSDK_D3D9_LIBRARY d3d9)
|
|
||||||
|
|
||||||
#FIND_DXSDK_LIBRARY(DXSDK_MESH_LIBRARY mesh)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
#FIND_DXSDK_LIBRARY(DXSDK_MAXUTIL_LIBRARY maxutil)
|
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x64")
|
||||||
#FIND_DXSDK_LIBRARY(DXSDK_MAXSCRIPT_LIBRARY maxscrpt)
|
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
#FIND_DXSDK_LIBRARY(DXSDK_PARAMBLK2_LIBRARY paramblk2)
|
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x86")
|
||||||
#FIND_DXSDK_LIBRARY(DXSDK_BMM_LIBRARY bmm)
|
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
|
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid)
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8)
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_DSOUND_LIBRARY dsound)
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_XAUDIO_LIBRARY x3daudio)
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_D3DX9_LIBRARY d3dx9)
|
||||||
|
FIND_DXSDK_LIBRARY(DXSDK_D3D9_LIBRARY d3d9)
|
||||||
|
|
||||||
|
#FIND_DXSDK_LIBRARY(DXSDK_MESH_LIBRARY mesh)
|
||||||
|
#FIND_DXSDK_LIBRARY(DXSDK_MAXUTIL_LIBRARY maxutil)
|
||||||
|
#FIND_DXSDK_LIBRARY(DXSDK_MAXSCRIPT_LIBRARY maxscrpt)
|
||||||
|
#FIND_DXSDK_LIBRARY(DXSDK_PARAMBLK2_LIBRARY paramblk2)
|
||||||
|
#FIND_DXSDK_LIBRARY(DXSDK_BMM_LIBRARY bmm)
|
||||||
|
ENDIF(DXSDK_DIR)
|
||||||
|
|
||||||
# Handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
|
# Handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
|
||||||
# all listed variables are TRUE.
|
# all listed variables are TRUE.
|
||||||
include(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(DirectXSDK DEFAULT_MSG
|
|
||||||
DXSDK_INCLUDE_DIR DXSDK_GUID_LIBRARY)
|
|
||||||
|
|
||||||
if(DirectXSDK_FOUND)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTXSDK DEFAULT_MSG DXSDK_DIR DXSDK_GUID_LIBRARY DXSDK_DINPUT_LIBRARY)
|
||||||
message(status " directx found.")
|
|
||||||
SET(DXSDK_LIBRARIES
|
|
||||||
${DXSDK_GUID_LIBRARY}
|
|
||||||
${DXSDK_DINPUT_LIBRARY}
|
|
||||||
${DXSDK_DSOUND_LIBRARY}
|
|
||||||
${DXSDK_D3DX9_LIBRARY}
|
|
||||||
${DXSDK_D3D9_LIBRARY})
|
|
||||||
|
|
||||||
else(DirectXSDK_FOUND)
|
MARK_AS_ADVANCED(DXSDK_INCLUDE_DIR
|
||||||
set(DXSDK_LIBRARIES)
|
DXSDK_GUID_LIBRARY
|
||||||
endif(DirectXSDK_FOUND)
|
DXSDK_DINPUT_LIBRARY
|
||||||
|
DXSDK_DSOUND_LIBRARY
|
||||||
mark_as_advanced(DXSDK_INCLUDE_DIR DXSDK_LIBRARIES)
|
DXSDK_XAUDIO_LIBRARY
|
||||||
|
DXSDK_D3DX9_LIBRARY
|
||||||
|
DXSDK_D3D9_LIBRARY)
|
||||||
|
|
Loading…
Reference in a new issue