Browse Source

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.
PatTheMav 1 year ago
parent
commit
7ae1c35fcb
1 changed files with 1 additions and 2 deletions
  1. 1 2
      plugins/obs-filters/cmake/speexdsp.cmake

+ 1 - 2
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 $<$<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()