From f2b9dd3462fe927fc3c1fd8f63f0cc5396fa85ad Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Thu, 8 May 2025 09:14:03 -0600 Subject: [PATCH] CMake: Windows: Use release libs of shaderc for debug builds. While shaderc is a c++ library that normally requires debug libs for ABI reasons, shaderc only exports a C interface, so it will link release mode libs just fine even for debug builds. This drops the time required for GPU_shader_compile_static in a debug build from 5 mins to 3 sec for @pragma37 no changes for release configurations. --- build_files/cmake/platform/platform_win32.cmake | 3 +-- source/creator/CMakeLists.txt | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 6c0ce15fed7..ff5d18f8bf1 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -1312,8 +1312,7 @@ if(WITH_VULKAN_BACKEND) set(SHADERC_INCLUDE_DIR ${SHADERC_ROOT_DIR}/include) set(SHADERC_INCLUDE_DIRS ${SHADERC_INCLUDE_DIR}) set(SHADERC_LIBRARY - DEBUG ${SHADERC_ROOT_DIR}/lib/shaderc_shared_d.lib - OPTIMIZED ${SHADERC_ROOT_DIR}/lib/shaderc_shared.lib + ${SHADERC_ROOT_DIR}/lib/shaderc_shared.lib ) set(SHADERC_LIBRARIES ${SHADERC_LIBRARY}) else() diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 6f6838dc65b..47c80855249 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -1501,12 +1501,7 @@ elseif(WIN32) windows_install_shared_manifest( FILES ${LIBDIR}/shaderc/bin/shaderc_shared.dll - RELEASE - ) - - windows_install_shared_manifest( - FILES ${LIBDIR}/shaderc/bin/shaderc_shared_d.dll - DEBUG + ALL ) windows_install_shared_manifest(