Allow using bundled DXC
This commit is contained in:
parent
0b483a84a1
commit
4d876a0ed9
|
@ -304,17 +304,30 @@ if (${WIN32})
|
||||||
set (DXC "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc.exe")
|
set (DXC "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc.exe")
|
||||||
add_compile_definitions(NOMINMAX)
|
add_compile_definitions(NOMINMAX)
|
||||||
else()
|
else()
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
find_program(DXC dxc)
|
||||||
if (APPLE)
|
if (DXC)
|
||||||
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
|
execute_process(COMMAND ${DXC} --version OUTPUT_VARIABLE DXC_VERSION)
|
||||||
else()
|
string(REGEX MATCH "([0-9]+)\\.([0-9]+)" DXC_VERSION "${DXC_VERSION}")
|
||||||
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
|
|
||||||
|
if (NOT DXC_VERSION VERSION_GREATER_EQUAL "1.8")
|
||||||
|
message(STATUS "DXC version is less than 1.8, using bundled DXC")
|
||||||
|
set(DXC "")
|
||||||
endif()
|
endif()
|
||||||
else()
|
endif()
|
||||||
if (APPLE)
|
|
||||||
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-macos")
|
if (NOT DXC)
|
||||||
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64|AMD64")
|
||||||
|
if (APPLE)
|
||||||
|
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
|
||||||
|
else()
|
||||||
|
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/x64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/x64/dxc")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-linux")
|
if (APPLE)
|
||||||
|
set (DXC "DYLD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-macos")
|
||||||
|
else()
|
||||||
|
set (DXC "LD_LIBRARY_PATH=${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/lib/arm64" "${PROJECT_SOURCE_DIR}/lib/rt64/src/contrib/dxc/bin/arm64/dxc-linux")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
2
lib/rt64
2
lib/rt64
|
@ -1 +1 @@
|
||||||
Subproject commit e106c18965a89b26197bde972d9a83dd2dea1691
|
Subproject commit fcca86d77afebb391e4a8e404cad46ba3ae883e3
|
Loading…
Reference in New Issue