diff options
author | Rechi <Rechi@users.noreply.github.com> | 2017-03-06 16:31:04 +0100 |
---|---|---|
committer | Rechi <Rechi@users.noreply.github.com> | 2017-03-06 16:31:04 +0100 |
commit | dd9d336806cb04984f75088cdc91cf7e69bec899 (patch) | |
tree | 08b3495281519efac80029ca6c1fe153a2696b1a /cmake | |
parent | 70b83e9446aaa5016001d720e86b0067c1f3108f (diff) |
[cmake][windows] use correct d3dcompiler depending on target architecture
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/modules/FindD3DX11Effects.cmake | 8 | ||||
-rw-r--r-- | cmake/scripts/windows/ArchSetup.cmake | 8 |
2 files changed, 11 insertions, 5 deletions
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) --------- |