diff options
Diffstat (limited to 'project/cmake/modules/FindD3DX11Effects.cmake')
| -rw-r--r-- | project/cmake/modules/FindD3DX11Effects.cmake | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/project/cmake/modules/FindD3DX11Effects.cmake b/project/cmake/modules/FindD3DX11Effects.cmake index 9de8c2b..d7468e1 100644 --- a/project/cmake/modules/FindD3DX11Effects.cmake +++ b/project/cmake/modules/FindD3DX11Effects.cmake | |||
| @@ -1,28 +1,8 @@ | |||
| 1 | # - Builds D3DX11Effects as external project | 1 | # - Finds D3DX11 dependencies |
| 2 | # Once done this will define | 2 | # Once done this will define |
| 3 | # | 3 | # |
| 4 | # D3DX11EFFECTS_FOUND - system has D3DX11Effects | ||
| 5 | # D3DX11EFFECTS_INCLUDE_DIRS - the D3DX11Effects include directories | ||
| 6 | # D3DCOMPILER_DLL - Path to the Direct3D Compiler | 4 | # D3DCOMPILER_DLL - Path to the Direct3D Compiler |
| 7 | 5 | # FXC - Path to the DirectX Effects Compiler (FXC) | |
| 8 | include(ExternalProject) | ||
| 9 | ExternalProject_Add(d3dx11effects | ||
| 10 | SOURCE_DIR ${CORE_SOURCE_DIR}/lib/win32/Effects11 | ||
| 11 | PREFIX ${CORE_BUILD_DIR}/Effects11 | ||
| 12 | CONFIGURE_COMMAND "" | ||
| 13 | BUILD_COMMAND msbuild ${CORE_SOURCE_DIR}/lib/win32/Effects11/Effects11_2013.sln | ||
| 14 | /t:Effects11 /p:Configuration=${CORE_BUILD_CONFIG} | ||
| 15 | INSTALL_COMMAND "") | ||
| 16 | |||
| 17 | set(D3DX11EFFECTS_FOUND 1) | ||
| 18 | set(D3DX11EFFECTS_INCLUDE_DIRS ${CORE_SOURCE_DIR}/lib/win32/Effects11/inc) | ||
| 19 | |||
| 20 | set(D3DX11EFFECTS_LIBRARY_RELEASE ${CORE_SOURCE_DIR}/lib/win32/Effects11/libs/Effects11/Release/Effects11.lib) | ||
| 21 | set(D3DX11EFFECTS_LIBRARY_DEBUG ${CORE_SOURCE_DIR}/lib/win32/Effects11/libs/Effects11/Debug/Effects11.lib) | ||
| 22 | include(SelectLibraryConfigurations) | ||
| 23 | select_library_configurations(D3DX11EFFECTS) | ||
| 24 | |||
| 25 | mark_as_advanced(D3DX11EFFECTS_FOUND) | ||
| 26 | 6 | ||
| 27 | find_file(D3DCOMPILER_DLL | 7 | find_file(D3DCOMPILER_DLL |
| 28 | NAMES d3dcompiler_47.dll d3dcompiler_46.dll | 8 | NAMES d3dcompiler_47.dll d3dcompiler_46.dll |
| @@ -36,6 +16,7 @@ if(NOT D3DCOMPILER_DLL) | |||
| 36 | message(WARNING "Could NOT find Direct3D Compiler") | 16 | message(WARNING "Could NOT find Direct3D Compiler") |
| 37 | endif() | 17 | endif() |
| 38 | mark_as_advanced(D3DCOMPILER_DLL) | 18 | mark_as_advanced(D3DCOMPILER_DLL) |
| 19 | copy_file_to_buildtree(${D3DCOMPILER_DLL} DIRECTORY .) | ||
| 39 | 20 | ||
| 40 | find_program(FXC fxc | 21 | find_program(FXC fxc |
| 41 | PATHS | 22 | PATHS |
