mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-13 05:30:14 +02:00
CMake updated for GPU compression under BUILD_DX11 option
This commit is contained in:
parent
18c2d9a5ca
commit
2f8e8120ae
@ -13,7 +13,7 @@ project (DirectXTex
|
|||||||
|
|
||||||
option(BUILD_TOOLS "Build tex command-line tools" ON)
|
option(BUILD_TOOLS "Build tex command-line tools" ON)
|
||||||
|
|
||||||
# Includes the functions for creating Direct3D 11 resources at runtime
|
# Includes the functions for Direct3D 11 resources and DirectCompute compression
|
||||||
option(BUILD_DX11 "Build with DirectX11 Runtime support" ON)
|
option(BUILD_DX11 "Build with DirectX11 Runtime support" ON)
|
||||||
|
|
||||||
# Includes the functions for creating Direct3D 12 resources at runtime
|
# Includes the functions for creating Direct3D 12 resources at runtime
|
||||||
@ -43,8 +43,6 @@ set(LIBRARY_HEADERS
|
|||||||
|
|
||||||
set(LIBRARY_SOURCES
|
set(LIBRARY_SOURCES
|
||||||
DirectXTex/BC.h
|
DirectXTex/BC.h
|
||||||
DirectXTex/BCDirectCompute.h
|
|
||||||
DirectXTex/d3dx12.h
|
|
||||||
DirectXTex/DDS.h
|
DirectXTex/DDS.h
|
||||||
DirectXTex/DirectXTexP.h
|
DirectXTex/DirectXTexP.h
|
||||||
DirectXTex/filters.h
|
DirectXTex/filters.h
|
||||||
@ -52,9 +50,7 @@ set(LIBRARY_SOURCES
|
|||||||
DirectXTex/BC.cpp
|
DirectXTex/BC.cpp
|
||||||
DirectXTex/BC4BC5.cpp
|
DirectXTex/BC4BC5.cpp
|
||||||
DirectXTex/BC6HBC7.cpp
|
DirectXTex/BC6HBC7.cpp
|
||||||
DirectXTex/BCDirectCompute.cpp
|
|
||||||
DirectXTex/DirectXTexCompress.cpp
|
DirectXTex/DirectXTexCompress.cpp
|
||||||
DirectXTex/DirectXTexCompressGPU.cpp
|
|
||||||
DirectXTex/DirectXTexConvert.cpp
|
DirectXTex/DirectXTexConvert.cpp
|
||||||
DirectXTex/DirectXTexDDS.cpp
|
DirectXTex/DirectXTexDDS.cpp
|
||||||
DirectXTex/DirectXTexFlipRotate.cpp
|
DirectXTex/DirectXTexFlipRotate.cpp
|
||||||
@ -74,10 +70,17 @@ set(SHADER_SOURCES
|
|||||||
DirectXTex/Shaders/BC7Encode.hlsl)
|
DirectXTex/Shaders/BC7Encode.hlsl)
|
||||||
|
|
||||||
if(BUILD_DX11)
|
if(BUILD_DX11)
|
||||||
set(LIBRARY_SOURCES ${LIBRARY_SOURCES} ${LIBRARY_HEADERS} DirectXTex/DirectXTexD3D11.cpp)
|
set(LIBRARY_SOURCES ${LIBRARY_SOURCES}
|
||||||
|
DirectXTex/BCDirectCompute.h
|
||||||
|
DirectXTex/BCDirectCompute.cpp
|
||||||
|
DirectXTex/DirectXTexCompressGPU.cpp
|
||||||
|
DirectXTex/DirectXTexD3D11.cpp
|
||||||
|
DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc)
|
||||||
endif()
|
endif()
|
||||||
if(BUILD_DX12)
|
if(BUILD_DX12)
|
||||||
set(LIBRARY_SOURCES ${LIBRARY_SOURCES} ${LIBRARY_HEADERS} DirectXTex/DirectXTexD3D12.cpp)
|
set(LIBRARY_SOURCES ${LIBRARY_SOURCES}
|
||||||
|
DirectXTex/d3dx12.h
|
||||||
|
DirectXTex/DirectXTexD3D12.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_OPENEXR_SUPPORT)
|
if(ENABLE_OPENEXR_SUPPORT)
|
||||||
@ -89,8 +92,9 @@ if(ENABLE_OPENEXR_SUPPORT)
|
|||||||
DirectXTex/DirectXTexEXR.cpp)
|
DirectXTex/DirectXTexEXR.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc)
|
add_library(${PROJECT_NAME} STATIC ${LIBRARY_SOURCES} ${LIBRARY_HEADERS})
|
||||||
|
|
||||||
|
if(BUILD_DX11)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc"
|
OUTPUT "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc"
|
||||||
MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/CompileShaders.cmd"
|
MAIN_DEPENDENCY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders/CompileShaders.cmd"
|
||||||
@ -99,6 +103,7 @@ add_custom_command(
|
|||||||
COMMAND "CompileShaders.cmd"
|
COMMAND "CompileShaders.cmd"
|
||||||
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders"
|
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/DirectXTex/Shaders"
|
||||||
USES_TERMINAL)
|
USES_TERMINAL)
|
||||||
|
endif()
|
||||||
|
|
||||||
source_group(${PROJECT_NAME} REGULAR_EXPRESSION DirectXTex/*.*)
|
source_group(${PROJECT_NAME} REGULAR_EXPRESSION DirectXTex/*.*)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user