From b22143a3b62eba790deb47c0539661b6585f087d Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sun, 6 Sep 2020 00:49:04 -0700 Subject: [PATCH 1/3] typos --- components/codecs/CMakeLists.txt | 10 +++++++--- components/codecs/link_helper.c | 4 +--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/components/codecs/CMakeLists.txt b/components/codecs/CMakeLists.txt index ab285a34..b57c75da 100644 --- a/components/codecs/CMakeLists.txt +++ b/components/codecs/CMakeLists.txt @@ -9,16 +9,20 @@ add_prebuilt_library(libhelix-aac lib/libhelix-aac.a ) add_prebuilt_library(libvorbisidec lib/libvorbisidec.a ) add_prebuilt_library(libogg lib/libogg.a ) add_prebuilt_library(libalac lib/libalac.a ) -add_prebuilt_library(libremple16 lib/libresample16.a ) +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 libremple16) +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 +) diff --git a/components/codecs/link_helper.c b/components/codecs/link_helper.c index 1a3df177..2dfd9073 100644 --- a/components/codecs/link_helper.c +++ b/components/codecs/link_helper.c @@ -1,3 +1 @@ -void dummy_obj() { - return; -} +static int a; \ No newline at end of file From a73c659a1e0acd6f520004a86a1ece45560299e1 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sun, 6 Sep 2020 16:54:09 -0700 Subject: [PATCH 2/3] 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 From 708a3f9c4a671605469f95b33618b933ad72dff2 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Sun, 6 Sep 2020 17:06:52 -0700 Subject: [PATCH 3/3] small tweaks --- components/display/display.c | 2 +- components/display/display.h | 2 +- components/services/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/display/display.c b/components/display/display.c index e4ef8026..0069ac39 100644 --- a/components/display/display.c +++ b/components/display/display.c @@ -400,7 +400,7 @@ const char *display_conf_get_driver_name(char * driver){ /**************************************************************************************** * */ -char * display_get_supported_drivers(){ +char * display_get_supported_drivers(void){ int total_size = 1; char * supported_drivers=NULL; const char * separator = "|"; diff --git a/components/display/display.h b/components/display/display.h index d5eeab97..dff354ca 100644 --- a/components/display/display.h +++ b/components/display/display.h @@ -39,4 +39,4 @@ void displayer_scroll(char *string, int speed, int pause); void displayer_control(enum displayer_cmd_e cmd, ...); void displayer_metadata(char *artist, char *album, char *title); void displayer_timer(enum displayer_time_e mode, int elapsed, int duration); -char * display_get_supported_drivers(); +char * display_get_supported_drivers(void); diff --git a/components/services/CMakeLists.txt b/components/services/CMakeLists.txt index f49dd5d3..23b4b943 100644 --- a/components/services/CMakeLists.txt +++ b/components/services/CMakeLists.txt @@ -1,6 +1,6 @@ idf_component_register(SRC_DIRS . - INCLUDE_DIRS . ${IDF_PATH}/components/driver - REQUIRES json tools platform_config display + INCLUDE_DIRS . + REQUIRES json tools platform_config display )