File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
11
11
set (CMAKE_POSITION_INDEPENDENT_CODE ON )
12
12
13
13
option (BUILD_SHARED_LIBS "Build using shared libraries" ON )
14
+ option (SHADY_USE_FETCHCONTENT "Use FetchContent to grab json-c" ON )
15
+ option (SHADY_WIN32_FIX_PARTIAL_LLVM_INSTALL "If you install LLVM on windows, it doesn't come with header files. This fixes it" ON )
14
16
15
17
if (MSVC )
16
18
add_compile_definitions (_CRT_SECURE_NO_WARNINGS )
@@ -22,7 +24,7 @@ endif()
22
24
23
25
add_subdirectory (SPIRV-Headers )
24
26
25
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24" )
27
+ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24" AND ${SHADY_USE_FETCHCONTENT} )
26
28
FetchContent_Declare (
27
29
json-c
28
30
GIT_REPOSITORY https://github.com/json-c/json-c
@@ -39,7 +41,7 @@ else ()
39
41
endif ()
40
42
41
43
find_package (LLVM QUIET )
42
- if (NOT ${LLVM_FOUND} AND WIN32 )
44
+ if (NOT ${LLVM_FOUND} AND WIN32 AND ${SHADY_WIN32_FIX_PARTIAL_LLVM_INSTALL} )
43
45
find_program (clang_exe "clang.exe" )
44
46
if (${clang_exe} STREQUAL "clang_exe-NOTFOUND" )
45
47
message (STATUS "Win32: Installed LLVM not found" )
You can’t perform that action at this time.
0 commit comments