Fixed: Didn't display any error when DirectX SDK was not found
Changed: Use of new variables to detect 64bits arch
This commit is contained in:
parent
ca8595138b
commit
ad36a89a1d
1 changed files with 4 additions and 9 deletions
|
@ -30,16 +30,11 @@ ENDMACRO(FIND_DXSDK_LIBRARY MYLIBRARY MYLIBRARYNAME)
|
|||
IF(DXSDK_DIR)
|
||||
SET(DXSDK_INCLUDE_DIR "${DXSDK_DIR}/Include")
|
||||
|
||||
IF(NOT CMAKE_SIZEOF_VOID_P)
|
||||
INCLUDE (CheckTypeSize)
|
||||
CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P)
|
||||
ENDIF(NOT CMAKE_SIZEOF_VOID_P)
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
IF(TARGET_X64)
|
||||
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x64")
|
||||
ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
ELSE(TARGET_X64)
|
||||
SET(DXSDK_LIBRARY_DIR "${DXSDK_DIR}/Lib/x86")
|
||||
ENDIF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
ENDIF(TARGET_X64)
|
||||
|
||||
FIND_DXSDK_LIBRARY(DXSDK_GUID_LIBRARY dxguid)
|
||||
FIND_DXSDK_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8)
|
||||
|
@ -59,7 +54,7 @@ ENDIF(DXSDK_DIR)
|
|||
# all listed variables are TRUE.
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DIRECTXSDK DEFAULT_MSG DXSDK_DIR DXSDK_GUID_LIBRARY DXSDK_DINPUT_LIBRARY)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(DirectXSDK DEFAULT_MSG DXSDK_DIR DXSDK_GUID_LIBRARY DXSDK_DINPUT_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(DXSDK_INCLUDE_DIR
|
||||
DXSDK_GUID_LIBRARY
|
||||
|
|
Loading…
Reference in a new issue