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.
This commit is contained in:
PatTheMav
2023-11-16 23:24:41 +01:00
committed by Rodney
parent 9391ab305e
commit 7ae1c35fcb
+1 -2
View File
@@ -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 $<$<PLATFORM_ID:Windows>:/LTCG> $<$<PLATFORM_ID:Windows>:/IGNORE:4098>
$<$<PLATFORM_ID:Windows>:/IGNORE:4099>)
target_link_options(obs-filters PRIVATE $<$<AND:$<PLATFORM_ID:Windows>,$<CONFIG:Debug>>:/NODEFAULTLIB:MSVCRT>)
target_enable_feature(obs-filters "SpeexDSP noise suppression" HAS_NOISEREDUCTION)
else()