From ff05fc8178a36078bbd0c1b105263d10f3842310 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 15 Apr 2013 21:32:57 +1000 Subject: [PATCH] Use the system's libmygpo-qt if it's available. Fixes issue 3518 --- CMakeLists.txt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2e46e1c41..fb52f6d7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,7 @@ pkg_check_modules(IMOBILEDEVICE libimobiledevice-1.0) pkg_check_modules(INDICATEQT indicate-qt) pkg_check_modules(LIBGPOD libgpod-1.0>=0.7.92) pkg_check_modules(LIBMTP libmtp>=1.0) +pkg_check_modules(LIBMYGPO_QT libmygpo-qt>=1.0.7) pkg_check_modules(LIBXML libxml-2.0) pkg_check_modules(PLIST libplist) pkg_check_modules(QCA qca2) @@ -416,10 +417,15 @@ if(NOT CHROMAPRINT_FOUND) endif(WIN32) endif(NOT CHROMAPRINT_FOUND) -# We have to use our own libmygpo-qt for now -add_subdirectory(3rdparty/libmygpo-qt) -set(MYGPOQT_LIBRARIES mygpo-qt) -set(MYGPOQT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/3rdparty/libmygpo-qt/) +# Use the system libmygpo-qt if a recent enough version was found +if(LIBMYGPO_QT_FOUND) + set(MYGPOQT_LIBRARIES ${LIBMYGPO_QT_LIBRARIES}) + set(MYGPOQT_INCLUDE_DIRS ${LIBMYGPO_QT_INCLUDE_DIRS}) +else() + add_subdirectory(3rdparty/libmygpo-qt) + set(MYGPOQT_LIBRARIES mygpo-qt) + set(MYGPOQT_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/3rdparty/libmygpo-qt/) +endif() # Qocoa add_subdirectory(3rdparty/qocoa)