Skip to content

Commit 9a6722e

Browse files
committed
Circumvented C++20 issue of liblavas json dependency and have shaderc default to static instead of shared runtime on MSVC
1 parent dc35e5b commit 9a6722e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ include(cmake/shaders.cmake)
77
set(CMAKE_CXX_STANDARD 20)
88
set(CXX_STANDARD_REQUIRED ON)
99

10+
# There is currently an issue with the comparison operators in nlohmann json
11+
# https://github.com/nlohmann/json/issues/3868
12+
# https://github.com/nlohmann/json/issues/3979
13+
add_compile_definitions(JSON_HAS_THREE_WAY_COMPARISON=0)
14+
15+
# shaderc defaults to the static runtime on MSVC
16+
if (MSVC)
17+
set(SHADERC_ENABLE_SHARED_CRT ON)
18+
endif (MVSC)
19+
1020
CPMAddPackage("gh:liblava/liblava#0.7.3")
1121
CPMAddPackage("gh:soehrl/cpp-sync#feature/rename-namespace")
1222
CPMAddPackage(NAME colormap GIT_REPOSITORY https://github.com/kbinani/colormap-shaders GIT_TAG master DOWNLOAD_ONLY YES)

0 commit comments

Comments
 (0)