Explorar o código

Do not use system paths when searching for the d3dcompiler DLL, to avoid using the wrong architecture.

Lasse Öörni %!s(int64=10) %!d(string=hai) anos
pai
achega
43c9120e33
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      CMake/Modules/FindDirect3D.cmake

+ 3 - 1
CMake/Modules/FindDirect3D.cmake

@@ -48,9 +48,11 @@ else ()
     set (PATH_SUFFIX x86)
     set (PATH_SUFFIX x86)
 endif ()
 endif ()
 # Only need to search the DLL as a proxy for the presence of the MS Windows SDK
 # Only need to search the DLL as a proxy for the presence of the MS Windows SDK
+# Note: do not use default paths such as the PATH variable, to potentially avoid using a wrong architecture DLL
 find_file (DIRECT3D_DLL NAMES ${DLL_NAMES} PATHS
 find_file (DIRECT3D_DLL NAMES ${DLL_NAMES} PATHS
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}"
     "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}"
-    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}")
+    "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${PATH_SUFFIX}"
+    NO_DEFAULT_PATH)
 if (DIRECT3D_DLL OR MINGW)  # MinGW compiler toolchain is assumed to come with its own necessary headers and libraries for Direct3D
 if (DIRECT3D_DLL OR MINGW)  # MinGW compiler toolchain is assumed to come with its own necessary headers and libraries for Direct3D
     if (NOT URHO3D_D3D11)
     if (NOT URHO3D_D3D11)
         set (DIRECT3D_LIBRARIES d3d9 d3dcompiler)
         set (DIRECT3D_LIBRARIES d3d9 d3dcompiler)