diff options
Diffstat (limited to 'cmake/modules/FindD3DX11Effects.cmake')
| -rw-r--r-- | cmake/modules/FindD3DX11Effects.cmake | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmake/modules/FindD3DX11Effects.cmake b/cmake/modules/FindD3DX11Effects.cmake new file mode 100644 index 0000000..3fdf7d7 --- /dev/null +++ b/cmake/modules/FindD3DX11Effects.cmake | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | # - Finds D3DX11 dependencies | ||
| 2 | # Once done this will define | ||
| 3 | # | ||
| 4 | # D3DCOMPILER_DLL - Path to the Direct3D Compiler | ||
| 5 | # FXC - Path to the DirectX Effects Compiler (FXC) | ||
| 6 | |||
| 7 | find_file(D3DCOMPILER_DLL | ||
| 8 | NAMES d3dcompiler_47.dll d3dcompiler_46.dll | ||
| 9 | PATHS | ||
| 10 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | ||
| 11 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | ||
| 12 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/Redist/D3D/${SDK_TARGET_ARCH}" | ||
| 13 | "$ENV{WindowsSdkDir}Redist/d3d/${SDK_TARGET_ARCH}" | ||
| 14 | NO_DEFAULT_PATH) | ||
| 15 | if(NOT D3DCOMPILER_DLL) | ||
| 16 | message(WARNING "Could NOT find Direct3D Compiler") | ||
| 17 | endif() | ||
| 18 | mark_as_advanced(D3DCOMPILER_DLL) | ||
| 19 | copy_file_to_buildtree(${D3DCOMPILER_DLL} DIRECTORY .) | ||
| 20 | |||
| 21 | find_program(FXC fxc | ||
| 22 | PATHS | ||
| 23 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0;InstallationFolder]/bin/x86" | ||
| 24 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.1;InstallationFolder]/bin/x86" | ||
| 25 | "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v8.0;InstallationFolder]/bin/x86" | ||
| 26 | "$ENV{WindowsSdkDir}bin/x86") | ||
| 27 | if(NOT FXC) | ||
| 28 | message(WARNING "Could NOT find DirectX Effects Compiler (FXC)") | ||
| 29 | endif() | ||
| 30 | mark_as_advanced(FXC) | ||
