shithub: opus

Download patch

ref: f2f8f338731787962971106654273aaa8b912a53
parent: 7f01183834af62890252b09e0f8cdc0b89220dec
author: Marcus Asteborg <maastebo@microsoft.com>
date: Wed Apr 22 16:29:37 EDT 2020

cmake - only publish opus_custom.h if custom modes is enabled #121

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -224,11 +224,14 @@
 
 set(Opus_PUBLIC_HEADER
     ${CMAKE_CURRENT_SOURCE_DIR}/include/opus.h
-    ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_custom.h
     ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_defines.h
     ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_multistream.h
     ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_projection.h
     ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_types.h)
+
+if(OPUS_CUSTOM_MODES)
+  list(APPEND Opus_PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/include/opus_custom.h)
+endif()
 
 add_library(opus ${opus_headers} ${opus_sources} ${opus_sources_float} ${Opus_PUBLIC_HEADER})
 add_library(Opus::opus ALIAS opus)