|
| 1 | +diff --git a/CMakeLists.txt b/CMakeLists.txt |
| 2 | +index 60172b0d..1dfe6e8a 100644 |
| 3 | +--- a/CMakeLists.txt |
| 4 | ++++ b/CMakeLists.txt |
| 5 | +@@ -55,18 +55,33 @@ set_package_properties(BISON PROPERTIES |
| 6 | + PURPOSE "Required for the Predicate parser" |
| 7 | + ) |
| 8 | + |
| 9 | +-find_package(IMobileDevice) |
| 10 | +-set_package_properties(IMobileDevice PROPERTIES |
| 11 | ++find_package(unofficial-libimobiledevice CONFIG) |
| 12 | ++set_package_properties(unofficial-libimobiledevice PROPERTIES |
| 13 | + TYPE OPTIONAL |
| 14 | + PURPOSE "Needed to build the iOS device support backend" |
| 15 | + ) |
| 16 | + |
| 17 | +-find_package(PList) |
| 18 | +-set_package_properties(PList PROPERTIES |
| 19 | ++find_package(unofficial-libplist CONFIG) |
| 20 | ++set_package_properties(unofficial-libplist PROPERTIES |
| 21 | + TYPE OPTIONAL |
| 22 | + PURPOSE "Needed to build the iOS device support backend" |
| 23 | + ) |
| 24 | + |
| 25 | ++set(HAVE_IMOBILE OFF) |
| 26 | ++if(TARGET unofficial::libimobiledevice::libimobiledevice AND TARGET unofficial::libplist::libplist) |
| 27 | ++ set(HAVE_IMOBILE ON) |
| 28 | ++ set(IMobileDevice_VERSION "1.3.0") |
| 29 | ++ set(_imobile_version "0x00000") |
| 30 | ++ if (IMobileDevice_VERSION VERSION_GREATER_EQUAL 1.3.0) |
| 31 | ++ set(_imobile_version "0x10300") |
| 32 | ++ elseif(IMobileDevice_VERSION VERSION_GREATER_EQUAL 1.2.0) |
| 33 | ++ set(_imobile_version "0x10200") |
| 34 | ++ endif() |
| 35 | ++ set_target_properties(unofficial::libimobiledevice::libimobiledevice PROPERTIES |
| 36 | ++ INTERFACE_COMPILE_DEFINITIONS "IMOBILEDEVICE_API=${_imobile_version}" |
| 37 | ++ ) |
| 38 | ++endif() |
| 39 | ++ |
| 40 | + # Used by the UDisks backend on Linux |
| 41 | + find_package(LibMount) |
| 42 | + set_package_properties(LibMount PROPERTIES |
| 43 | +@@ -138,7 +153,7 @@ elseif (NOT ANDROID) |
| 44 | + endif() |
| 45 | + endif() |
| 46 | + |
| 47 | +-if(IMobileDevice_FOUND AND PList_FOUND) |
| 48 | ++if(HAVE_IMOBILE) |
| 49 | + add_device_backend(imobile) |
| 50 | + endif() |
| 51 | + |
| 52 | +diff --git a/KF5SolidConfig.cmake.in b/KF5SolidConfig.cmake.in |
| 53 | +index 6fc15eeb..a6250ce6 100644 |
| 54 | +--- a/KF5SolidConfig.cmake.in |
| 55 | ++++ b/KF5SolidConfig.cmake.in |
| 56 | +@@ -27,6 +27,11 @@ if (NOT @BUILD_SHARED_LIBS@) |
| 57 | + find_dependency(LibMount) |
| 58 | + endif() |
| 59 | + |
| 60 | ++ if (@HAVE_IMOBILE@) |
| 61 | ++ find_dependency(unofficial-libimobiledevice) |
| 62 | ++ find_dependency(unofficial-libplist) |
| 63 | ++ endif() |
| 64 | ++ |
| 65 | + if ("@Qt5DBus_FOUND@" OR "@Qt6DBus_FOUND@") |
| 66 | + find_dependency(Qt@QT_MAJOR_VERSION@DBus @REQUIRED_QT_VERSION@) |
| 67 | + endif() |
| 68 | +diff --git a/src/solid/devices/backends/imobile/CMakeLists.txt b/src/solid/devices/backends/imobile/CMakeLists.txt |
| 69 | +index e1666447..3f8b982e 100644 |
| 70 | +--- a/src/solid/devices/backends/imobile/CMakeLists.txt |
| 71 | ++++ b/src/solid/devices/backends/imobile/CMakeLists.txt |
| 72 | +@@ -5,7 +5,7 @@ set(backend_sources |
| 73 | + imobiledeviceinterface.cpp |
| 74 | + imobileportablemediaplayer.cpp |
| 75 | + ) |
| 76 | +-set(backend_libs IMobileDevice::IMobileDevice PList::PList) |
| 77 | ++set(backend_libs unofficial::libimobiledevice::libimobiledevice unofficial::libplist::libplist) |
| 78 | + |
| 79 | + ecm_qt_declare_logging_category(backend_sources |
| 80 | + HEADER imobile_debug.h |
0 commit comments