Description: The Debian source contains the lpcnet tar source, So this patch uses that feature and avoids fetching content. Author: A. Maitland Bottoms Forwarded: not-needed --- a/LPCNet/CMakeLists.txt +++ b/LPCNet/CMakeLists.txt @@ -85,7 +85,7 @@ endif() # Set default flags -set(CMAKE_C_FLAGS "-Wall -W -Wextra -Wno-unused-function -O3 -g -I. -MD ${CMAKE_C_FLAGS} -DENABLE_ASSERTIONS") +set(CMAKE_C_FLAGS "-Wall -W -Wextra -Wno-unused-function -fPIC -O3 -g -I. -MD ${CMAKE_C_FLAGS} -DENABLE_ASSERTIONS") # Arch specific stuff here message(STATUS "Host system arch is: ${CMAKE_SYSTEM_PROCESSOR}") @@ -164,6 +164,9 @@ set(LPCNET_C_PROC_FLAGS -mfpu=neon -march=armv8-a -mtune=cortex-a53) endif() +if(LPCNET_191005_DIR) +set(lpcnet_SOURCE_DIR ${LPCNET_191005_DIR}) +else() # grab latest NN model (or substitute your own) set(LPCNET_ROOT http://rowetel.com/downloads/deep/) set(LPCNET_FILE lpcnet_191005_v1.0.tgz) @@ -195,6 +198,7 @@ FetchContent_Populate(lpcnet) endif() endif() +endif() add_subdirectory(src) --- a/LPCNet/src/CMakeLists.txt +++ b/LPCNet/src/CMakeLists.txt @@ -40,7 +40,7 @@ endforeach() endif(LPCNET_C_PROC_FLAGS) -add_library(lpcnetfreedv SHARED ${lpcnet_freedv_srcs} ${codec2_import_srcs}) +add_library(lpcnetfreedv STATIC ${lpcnet_freedv_srcs} ${codec2_import_srcs}) set_target_properties(lpcnetfreedv PROPERTIES PUBLIC_HEADER lpcnet_freedv.h --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -249,6 +249,7 @@ endif(UNIX) if(LPCNET AND lpcnetfreedv_FOUND) target_link_libraries(codec2 PRIVATE lpcnetfreedv) + list(APPEND CODEC2_PUBLIC_HEADERS ${CMAKE_SOURCE_DIR}/LPCNet/src/lpcnet_freedv.h) endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR}) set_target_properties(codec2 PROPERTIES