diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2023-12-13 03:22:25 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-12-20 07:01:27 +0300 |
commit | 8007e50e67f6f1f118e65b742c97e47967c84cd7 (patch) | |
tree | c007cb11bd4911bafa0d52740eaab931142307a7 | |
parent | 4aaa9076409834c307016a3374f5e8d798e92bff (diff) |
CMake: only build PLC code when needed
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f8fcb65..1f6ebc22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,7 +368,6 @@ endif() add_sources_group(opus silk ${silk_headers} ${silk_sources}) add_sources_group(opus celt ${celt_headers} ${celt_sources}) -add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources}) if(OPUS_FIXED_POINT) add_sources_group(opus silk ${silk_sources_fixed}) @@ -383,11 +382,16 @@ if(NOT OPUS_ENABLE_FLOAT_API) target_compile_definitions(opus PRIVATE DISABLE_FLOAT_API) endif() +if (OPUS_DEEP_PLC) + add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources}) +endif() + if (OPUS_DRED) add_sources_group(opus lpcnet ${dred_headers} ${dred_sources}) target_compile_definitions(opus PRIVATE ENABLE_DRED) if(NOT OPUS_DEEP_PLC) - target_compile_definitions(opus PRIVATE ENABLE_DEEP_PLC) + target_compile_definitions(opus PRIVATE ENABLE_DEEP_PLC) + add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources}) endif() endif() @@ -395,7 +399,8 @@ if (OPUS_OSCE) add_sources_group(opus lpcnet ${osce_headers} ${osce_sources}) target_compile_definitions(opus PRIVATE ENABLE_OSCE) if(NOT OPUS_DEEP_PLC) - target_compile_definitions(opus PRIVATE ENABLE_DEEP_PLC) + target_compile_definitions(opus PRIVATE ENABLE_DEEP_PLC) + add_sources_group(opus lpcnet ${deep_plc_headers} ${deep_plc_sources}) endif() endif() |