Add option to control runtime shader compiler
This commit is contained in:
1
3rdParty/imgui/CMakeLists.txt
vendored
1
3rdParty/imgui/CMakeLists.txt
vendored
@@ -30,7 +30,6 @@ if (glfw_FOUND)
|
|||||||
target_link_libraries(imgui_internal PUBLIC glfw)
|
target_link_libraries(imgui_internal PUBLIC glfw)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(NO_SHADERC ON)
|
|
||||||
SetupVulkan(imgui_internal)
|
SetupVulkan(imgui_internal)
|
||||||
target_include_directories(imgui_internal PUBLIC ${Vulkan_INCLUDE_DIR})
|
target_include_directories(imgui_internal PUBLIC ${Vulkan_INCLUDE_DIR})
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ option(TRACY_ENABLE "Enable Tracy Profiler" OFF)
|
|||||||
option(ENABLE_TEST "Enable testing" ON)
|
option(ENABLE_TEST "Enable testing" ON)
|
||||||
option(ENABLE_EXAMPLE "Enable examples" ON)
|
option(ENABLE_EXAMPLE "Enable examples" ON)
|
||||||
option(ENABLE_MSDF "Enable msdf library" ON)
|
option(ENABLE_MSDF "Enable msdf library" ON)
|
||||||
|
option(ENABLE_SHADERC "Enable runtime shader compiler" OFF)
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
||||||
if (IOS)
|
if (IOS)
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ function(SetupVulkan TARGET)
|
|||||||
else ()
|
else ()
|
||||||
find_package(Vulkan REQUIRED)
|
find_package(Vulkan REQUIRED)
|
||||||
target_link_libraries(${TARGET} PRIVATE Vulkan::Vulkan)
|
target_link_libraries(${TARGET} PRIVATE Vulkan::Vulkan)
|
||||||
if (NO_SHADERC)
|
if (ENABLE_SHADERC)
|
||||||
message("Disable shaderc linking")
|
|
||||||
else()
|
|
||||||
find_package(Vulkan OPTIONAL_COMPONENTS shaderc_combined)
|
find_package(Vulkan OPTIONAL_COMPONENTS shaderc_combined)
|
||||||
if (Vulkan_shaderc_combined_FOUND)
|
if (Vulkan_shaderc_combined_FOUND)
|
||||||
target_link_libraries(${TARGET} PRIVATE Vulkan::shaderc_combined)
|
target_link_libraries(${TARGET} PRIVATE Vulkan::shaderc_combined)
|
||||||
|
|||||||
Reference in New Issue
Block a user