From a73c659a1e0acd6f520004a86a1ece45560299e1 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sun, 6 Sep 2020 16:54:09 -0700 Subject: [PATCH] solving mistery of component made of external static libs only (and I hate CMake) --- components/codecs/CMakeLists.txt | 27 +++++++++++---------------- components/codecs/link_helper.c | 1 - 2 files changed, 11 insertions(+), 17 deletions(-) delete mode 100644 components/codecs/link_helper.c diff --git a/components/codecs/CMakeLists.txt b/components/codecs/CMakeLists.txt index b57c75da..78f4fa32 100644 --- a/components/codecs/CMakeLists.txt +++ b/components/codecs/CMakeLists.txt @@ -1,6 +1,5 @@ -idf_component_register(SRC_DIRS . - INCLUDE_DIRS . ./inc inc/alac inc/FLAC inc/helix-aac inc/mad inc/ogg inc/opus inc/opusfile inc/resample16 inc/soxr inc/vorbis - PRIV_REQUIRES newlib +idf_component_register( + INCLUDE_DIRS . ./inc inc/alac inc/FLAC inc/helix-aac inc/mad inc/ogg inc/opus inc/opusfile inc/resample16 inc/soxr inc/vorbis ) add_prebuilt_library(libmad lib/libmad.a) @@ -13,16 +12,12 @@ add_prebuilt_library(libresample16 lib/libresample16.a ) add_prebuilt_library(libopusfile lib/libopusfile.a ) add_prebuilt_library(libopus lib/libopus.a ) -target_link_libraries(${COMPONENT_LIB} PRIVATE libmad) -target_link_libraries(${COMPONENT_LIB} PRIVATE libFLAC) -target_link_libraries(${COMPONENT_LIB} PRIVATE libhelix-aac) -target_link_libraries(${COMPONENT_LIB} PRIVATE libvorbisidec) -target_link_libraries(${COMPONENT_LIB} PRIVATE libogg) -target_link_libraries(${COMPONENT_LIB} PRIVATE libalac) -target_link_libraries(${COMPONENT_LIB} PRIVATE libresample16) -target_link_libraries(${COMPONENT_LIB} PRIVATE libopusfile) -target_link_libraries(${COMPONENT_LIB} PRIVATE libopus) - -set_source_files_properties(link_helper.c - PROPERTIES COMPILE_FLAGS -Wno-unused-variable -) +target_link_libraries(${COMPONENT_LIB} INTERFACE libmad) +target_link_libraries(${COMPONENT_LIB} INTERFACE libFLAC) +target_link_libraries(${COMPONENT_LIB} INTERFACE libhelix-aac) +target_link_libraries(${COMPONENT_LIB} INTERFACE libvorbisidec) +target_link_libraries(${COMPONENT_LIB} INTERFACE libogg) +target_link_libraries(${COMPONENT_LIB} INTERFACE libalac) +target_link_libraries(${COMPONENT_LIB} INTERFACE libresample16) +target_link_libraries(${COMPONENT_LIB} INTERFACE libopusfile) +target_link_libraries(${COMPONENT_LIB} INTERFACE libopus) diff --git a/components/codecs/link_helper.c b/components/codecs/link_helper.c deleted file mode 100644 index 2dfd9073..00000000 --- a/components/codecs/link_helper.c +++ /dev/null @@ -1 +0,0 @@ -static int a; \ No newline at end of file