From dd9d336806cb04984f75088cdc91cf7e69bec899 Mon Sep 17 00:00:00 2001 From: Rechi Date: Mon, 6 Mar 2017 16:31:04 +0100 Subject: [cmake][windows] use correct d3dcompiler depending on target architecture --- cmake/modules/FindD3DX11Effects.cmake | 8 ++++---- cmake/scripts/windows/ArchSetup.cmake | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'cmake') diff --git a/cmake/modules/FindD3DX11Effects.cmake b/cmake/modules/FindD3DX11Effects.cmake index d7468e1db1..3fdf7d7468 100644 --- a/cmake/modules/FindD3DX11Effects.cmake +++ b/cmake/modules/FindD3DX11Effects.cmake @@ -7,10 +7,10 @@ find_file(D3DCOMPILER_DLL NAMES d3dcompiler_47.dll d3dcompiler_46.dll PATHS - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/x86" - "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/x86" - "$ENV{WindowsSdkDir}Redist/d3d/x86" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" + "$ENV{WindowsSdkDir}Redist/d3d/${SDK_TARGET_ARCH}" NO_DEFAULT_PATH) if(NOT D3DCOMPILER_DLL) message(WARNING "Could NOT find Direct3D Compiler") diff --git a/cmake/scripts/windows/ArchSetup.cmake b/cmake/scripts/windows/ArchSetup.cmake index bf85e15fbf..abe36cac97 100644 --- a/cmake/scripts/windows/ArchSetup.cmake +++ b/cmake/scripts/windows/ArchSetup.cmake @@ -1,6 +1,12 @@ # -------- Architecture settings --------- -set(ARCH win32) +if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(ARCH win32) + set(SDK_TARGET_ARCH x86) +elseif(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(ARCH x64) + set(SDK_TARGET_ARCH x64) +endif() # -------- Paths (mainly for find_package) --------- -- cgit v1.2.3