From 5b9b5300135f914f3cad25f723b41bf04b8c3c38 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 14 May 2011 14:05:31 +0200 Subject: [PATCH] Fixed: Didn't display any error when DirectX SDK was not found Changed: Use of new variables to detect 64bits arch --- code/CMakeModules/FindDirectXSDK.cmake | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/code/CMakeModules/FindDirectXSDK.cmake b/code/CMakeModules/FindDirectXSDK.cmake index d21261b95..1f832cf95 100644 --- a/code/CMakeModules/FindDirectXSDK.cmake +++ b/code/CMakeModules/FindDirectXSDK.cmake @@ -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