diff --git a/3rdParty/imgui/CMakeLists.txt b/3rdParty/imgui/CMakeLists.txt index c458b94..c1882d3 100644 --- a/3rdParty/imgui/CMakeLists.txt +++ b/3rdParty/imgui/CMakeLists.txt @@ -30,7 +30,6 @@ if (glfw_FOUND) target_link_libraries(imgui_internal PUBLIC glfw) endif () -set(NO_SHADERC ON) SetupVulkan(imgui_internal) target_include_directories(imgui_internal PUBLIC ${Vulkan_INCLUDE_DIR}) diff --git a/CMakeLists.txt b/CMakeLists.txt index efef478..e33b3d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,7 @@ option(TRACY_ENABLE "Enable Tracy Profiler" OFF) option(ENABLE_TEST "Enable testing" ON) option(ENABLE_EXAMPLE "Enable examples" ON) option(ENABLE_MSDF "Enable msdf library" ON) +option(ENABLE_SHADERC "Enable runtime shader compiler" OFF) # ----------------------------------------------------------------- if (IOS) diff --git a/cmake/functions/SetupVulkan.cmake b/cmake/functions/SetupVulkan.cmake index 3a14b93..e67b840 100644 --- a/cmake/functions/SetupVulkan.cmake +++ b/cmake/functions/SetupVulkan.cmake @@ -5,9 +5,7 @@ function(SetupVulkan TARGET) else () find_package(Vulkan REQUIRED) target_link_libraries(${TARGET} PRIVATE Vulkan::Vulkan) - if (NO_SHADERC) - message("Disable shaderc linking") - else() + if (ENABLE_SHADERC) find_package(Vulkan OPTIONAL_COMPONENTS shaderc_combined) if (Vulkan_shaderc_combined_FOUND) target_link_libraries(${TARGET} PRIVATE Vulkan::shaderc_combined)