Skip to content

Commit 1969946

Browse files
thresheekrobUx4
authored andcommitted
contribs: chromaprint: more fixes for .pc file.
- Moved AVFFT check: FFMPEG_LIBRARIES might be unset even if all needed FFmpeg libraries were found. - Added an ability to link with VDSP/Accelerate Framework on macOS.
1 parent 41e23c2 commit 1969946

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,16 @@ endif()
127127
if(FFT_LIB STREQUAL "vdsp")
128128
if(ACCELERATE_LIBRARIES)
129129
set(USE_VDSP ON)
130+
set(CHROMAPRINT_ADDITIONAL_LIBS "-F${ACCELERATE_LIBRARIES} -framework Accelerate")
130131
else()
131132
message(FATAL_ERROR "Selected ${FFT_LIB} for FFT calculations, but the library is not found")
132133
endif()
133134
elseif(FFT_LIB STREQUAL "avfft")
134135
if(FFMPEG_LIBAVCODEC_FFT_FOUND)
135136
set(USE_AVFFT ON)
137+
find_package(PkgConfig)
138+
pkg_check_modules(AVFFT REQUIRED libavcodec libavutil)
139+
string(REPLACE ";" " " CHROMAPRINT_ADDITIONAL_LIBS "${AVFFT_LDFLAGS}")
136140
else()
137141
message(FATAL_ERROR "Selected ${FFT_LIB} for FFT calculations, but the library is not found")
138142
endif()

libchromaprint.pc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Name: ${PROJECT_NAME}
77
Description: Audio fingerprint library
88
URL: http://acoustid.org/chromaprint
99
Version: ${PROJECT_VERSION}
10-
Libs: -L${LIB_INSTALL_DIR} -lchromaprint
10+
Libs: -L${LIB_INSTALL_DIR} -lchromaprint @CHROMAPRINT_ADDITIONAL_LIBS@
1111
Cflags: -I${INCLUDE_INSTALL_DIR}
1212

0 commit comments

Comments
 (0)