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:
kervala 2011-05-14 14:05:31 +02:00
parent 87aa990f3a
commit 5b9b530013

View file

@ -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