From cd37a40bab7bcfc52f5911247d6014545ed5a114 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 16 Jun 2021 22:54:23 +0200 Subject: [PATCH] Only link to chromaprint when song fingerprinting or musicbrainz is enabled --- src/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 391885ee..09431dfe 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -862,7 +862,9 @@ UI ) # CHROMAPRINT -optional_source(CHROMAPRINT_FOUND SOURCES engine/chromaprinter.cpp) +if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ) + optional_source(CHROMAPRINT_FOUND SOURCES engine/chromaprinter.cpp) +endif() # MusicBrainz optional_source(HAVE_MUSICBRAINZ @@ -1093,9 +1095,9 @@ if(HAVE_VLC) link_directories(${LIBVLC_LIBRARY_DIRS}) endif() -if(CHROMAPRINT_FOUND) +if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ) link_directories(${CHROMAPRINT_LIBRARY_DIRS}) -endif(CHROMAPRINT_FOUND) +endif() if(X11_FOUND) link_directories(${X11_LIBRARY_DIRS}) @@ -1211,10 +1213,10 @@ if(HAVE_VLC) target_link_libraries(strawberry_lib PRIVATE ${LIBVLC_LIBRARIES}) endif() -if(CHROMAPRINT_FOUND) +if(HAVE_SONGFINGERPRINTING OR HAVE_MUSICBRAINZ) target_include_directories(strawberry_lib SYSTEM PRIVATE ${CHROMAPRINT_INCLUDE_DIRS}) target_link_libraries(strawberry_lib PRIVATE ${CHROMAPRINT_LIBRARIES}) -endif(CHROMAPRINT_FOUND) +endif() if(X11_FOUND) target_include_directories(strawberry_lib SYSTEM PRIVATE ${X11_INCLUDE_DIR})