summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTimothy B. Terriberry <territim@amazon.com>2022-07-06 15:23:12 -0700
committerTimothy B. Terriberry <territim@amazon.com>2022-07-09 21:18:52 -0700
commit08088411259056f63774befb2d00951fdd5c46ba (patch)
treea501ceff6a61d14806d6edc6d38004e96fbeb87d /CMakeLists.txt
parent71fb707875b95672f0cd1cb153c890eff4219720 (diff)
downloadopus-08088411259056f63774befb2d00951fdd5c46ba.tar.gz
Only build platform RTCD sources when enabled.
To avoid issues with empty compilation units.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21c7ae53..9d824cdc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -381,6 +381,8 @@ if(NOT OPUS_DISABLE_INTRINSICS)
message(ERROR "Runtime cpu capability detection is enabled while CPU_INFO is not supported")
endif()
endif()
+ add_sources_group(opus celt ${celt_sources_x86_rtcd})
+ add_sources_group(opus silk ${silk_sources_x86_rtcd})
endif()
if(SSE1_SUPPORTED)
@@ -465,15 +467,13 @@ if(NOT OPUS_DISABLE_INTRINSICS)
endif()
endif()
- if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm|aarch64)")
- add_sources_group(opus celt ${celt_sources_arm})
- endif()
-
if(COMPILER_SUPPORT_NEON)
if(OPUS_MAY_HAVE_NEON)
if(RUNTIME_CPU_CAPABILITY_DETECTION)
message(STATUS "OPUS_MAY_HAVE_NEON enabling runtime detection")
target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD)
+ add_sources_group(opus celt ${celt_sources_arm_rtcd})
+ add_sources_group(opus silk ${silk_sources_arm_rtcd})
else()
message(ERROR "Runtime cpu capability detection needed for MAY_HAVE_NEON")
endif()