summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuigi Toscano <luigi.toscano@tiscali.it>2016-12-11 23:43:15 (GMT)
committerLuigi Toscano <luigi.toscano@tiscali.it>2016-12-11 23:54:04 (GMT)
commitbb30765a44df9ada47953477533b0a07ffabfc0d (patch)
treeb534b7f576c4a86ff18577be210f80cbafadcb26
parentf787e70fd528bf7620ca6714b800c566de98bb97 (diff)
Fix for the fix: properly look for libmusicbrainz5
The newer libmusicbrainz5 (git snapshot) installs a separate C++ library (libmusicbrainz5cc), so first look for it and then fallback to the normal libmusicbrainz5. Reviewed-by: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-rw-r--r--cmake/FindMusicBrainz5.cmake5
-rw-r--r--libkcddb/CMakeLists.txt2
2 files changed, 5 insertions, 2 deletions
diff --git a/cmake/FindMusicBrainz5.cmake b/cmake/FindMusicBrainz5.cmake
index f41eb86..b6cdbd8 100644
--- a/cmake/FindMusicBrainz5.cmake
+++ b/cmake/FindMusicBrainz5.cmake
@@ -16,7 +16,10 @@ endif()
find_path(MUSICBRAINZ5_INCLUDE_DIR musicbrainz5/Disc.h)
-find_library(MUSICBRAINZ5_LIBRARIES NAMES musicbrainz5)
+find_library(MUSICBRAINZ5_LIBRARIES NAMES musicbrainz5cc)
+if (NOT MUSICBRAINZ5_LIBRARIES)
+ find_library(MUSICBRAINZ5_LIBRARIES NAMES musicbrainz5)
+endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MusicBrainz5 DEFAULT_MSG MUSICBRAINZ5_INCLUDE_DIR MUSICBRAINZ5_LIBRARIES)
diff --git a/libkcddb/CMakeLists.txt b/libkcddb/CMakeLists.txt
index ad26e1c..89f8f41 100644
--- a/libkcddb/CMakeLists.txt
+++ b/libkcddb/CMakeLists.txt
@@ -58,7 +58,7 @@ target_link_libraries(KF5Cddb
Qt5::Network)
if(MUSICBRAINZ5_FOUND)
- target_link_libraries(KF5Cddb PRIVATE musicbrainz5cc)
+ target_link_libraries(KF5Cddb PRIVATE musicbrainz)
endif()
ki18n_wrap_ui(ui_sources cdinfodialog.ui cdinfoencodingwidget.ui)