From 7ae1c35fcb6cacb1b3319ceb87e97564ac4fded2 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 14 Nov 2023 14:09:24 +0100 Subject: [PATCH] obs-filters: Remove LTCG linker flag for SpeexDSP builds on Windows Flag was added in CMake 2.0 update and is incompatible with incremental linking enabled by default for Debug configuration (MSVC default). The original error that necessitates adding LTCG is not present with current obs-deps anymore, so remove it instead and disable the hard-coded default library directive in Debug configuration. --- plugins/obs-filters/cmake/speexdsp.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/obs-filters/cmake/speexdsp.cmake b/plugins/obs-filters/cmake/speexdsp.cmake index 6b0838b5e..eec6d2b76 100644 --- a/plugins/obs-filters/cmake/speexdsp.cmake +++ b/plugins/obs-filters/cmake/speexdsp.cmake @@ -6,8 +6,7 @@ if(ENABLE_SPEEXDSP) target_sources(obs-filters PRIVATE noise-suppress-filter.c) target_link_libraries(obs-filters PRIVATE SpeexDSP::Libspeexdsp) target_compile_definitions(obs-filters PRIVATE LIBSPEEXDSP_ENABLED) - target_link_options(obs-filters PRIVATE $<$:/LTCG> $<$:/IGNORE:4098> - $<$:/IGNORE:4099>) + target_link_options(obs-filters PRIVATE $<$,$>:/NODEFAULTLIB:MSVCRT>) target_enable_feature(obs-filters "SpeexDSP noise suppression" HAS_NOISEREDUCTION) else()