File tree 6 files changed +21
-13
lines changed
6 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 10
10
[submodule "thirdparty/fmt "]
11
11
path = thirdparty/fmt
12
12
url = https://github.com/fmtlib/fmt.git
13
+ [submodule "thirdparty/dxc-bin "]
14
+ path = thirdparty/dxc-bin
15
+ url = https://github.com/renderbag/dxc-bin.git
Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.20)
2
2
3
- include ($ENV{VCPKG_ROOT} /scripts/buildsystems/vcpkg.cmake)
4
3
set (CMAKE_CXX_STANDARD 17)
5
4
6
5
project ("XenosRecomp-ALL" )
Original file line number Diff line number Diff line change @@ -18,11 +18,8 @@ add_executable(XenosRecomp
18
18
shader_recompiler.h
19
19
"${SMOLV_SOURCE_DIR} /smolv.cpp" )
20
20
21
- find_package (directx-dxc CONFIG REQUIRED)
22
-
23
21
target_link_libraries (XenosRecomp PRIVATE
24
22
Microsoft::DirectXShaderCompiler
25
- Microsoft::DXIL
26
23
xxHash::xxhash
27
24
libzstd_static
28
25
fmt::fmt)
@@ -31,16 +28,26 @@ target_include_directories(XenosRecomp PRIVATE ${SMOLV_SOURCE_DIR})
31
28
32
29
target_precompile_headers(XenosRecomp PRIVATE pch.h)
33
30
34
- if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
31
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" )
35
32
target_compile_options (XenosRecomp PRIVATE -Wno-switch -Wno-unused-variable -Wno-null-arithmetic -fms-extensions)
33
+
34
+ include (CheckCXXSymbolExists)
35
+ check_cxx_symbol_exists(_LIBCPP_VERSION version LIBCPP)
36
+ if (LIBCPP)
37
+ # Allows using std::execution
38
+ target_compile_options (XenosRecomp PRIVATE -fexperimental-library)
39
+ endif ()
36
40
endif ()
37
41
38
42
if (WIN32 )
39
43
target_compile_definitions (XenosRecomp PRIVATE _CRT_SECURE_NO_WARNINGS)
40
- find_file (DIRECTX_DXIL_LIBRARY "dxil.dll" )
41
- file (COPY ${DIRECTX_DXIL_LIBRARY} DESTINATION ${CMAKE_CURRENT_BINARY_DIR} )
44
+ add_custom_command (TARGET XenosRecomp POST_BUILD
45
+ COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:XenosRecomp> $<TARGET_FILE_DIR:XenosRecomp>
46
+ COMMAND_EXPAND_LISTS
47
+ )
42
48
endif ()
43
49
44
50
if (XENOS_RECOMP_DXIL)
45
51
target_compile_definitions (XenosRecomp PRIVATE XENOS_RECOMP_DXIL)
52
+ target_link_libraries (XenosRecomp PRIVATE Microsoft::DXIL)
46
53
endif ()
Original file line number Diff line number Diff line change 9
9
if (NOT TARGET libzstd)
10
10
add_subdirectory ("${XENOS_RECOMP_THIRDPARTY_ROOT} /zstd/build/cmake" )
11
11
endif ()
12
+
13
+ if (NOT TARGET Microsoft::DirectXShaderCompiler)
14
+ add_subdirectory ("${XENOS_RECOMP_THIRDPARTY_ROOT} /dxc-bin" )
15
+ endif ()
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments