diff --git a/src/plugins/ios/ios.pro b/src/plugins/ios/ios.pro index fcfe58b6e2eec1785f432d268c5548d8abb52365..a9f3201e801fcb0b1bff6dd8336a36ee096ad472 100644 --- a/src/plugins/ios/ios.pro +++ b/src/plugins/ios/ios.pro @@ -5,7 +5,7 @@ include(../../qtcreatorplugin.pri) QT += xml network -LIBS += -framework CoreFoundation -framework IOKit +macx: LIBS += -framework CoreFoundation -framework IOKit HEADERS += \ iosconstants.h \ diff --git a/src/plugins/ios/iosdevice.cpp b/src/plugins/ios/iosdevice.cpp index 616158636edefc187870d9209121747fb5596de3..378cf43031e70d501a6446a13056f717dd875f6c 100644 --- a/src/plugins/ios/iosdevice.cpp +++ b/src/plugins/ios/iosdevice.cpp @@ -39,15 +39,18 @@ #include <QVariantMap> #include <QMessageBox> +#ifdef Q_OS_MAC #include <IOKit/IOKitLib.h> #include <IOKit/usb/IOUSBLib.h> #include <CoreFoundation/CoreFoundation.h> +#endif + using namespace ProjectExplorer; static bool debugDeviceDetection = false; -namespace { -QString CFStringRef2QString(CFStringRef s) +#ifdef Q_OS_MAC +static QString CFStringRef2QString(CFStringRef s) { unsigned char buf[250]; CFIndex len = CFStringGetLength(s); @@ -67,8 +70,7 @@ QString CFStringRef2QString(CFStringRef s) delete[] bigBuf; return res; } - -} +#endif namespace Ios { namespace Internal { @@ -349,6 +351,7 @@ void IosDeviceManager::infoGathererFinished(IosToolHandler *gatherer) gatherer->deleteLater(); } +#ifdef Q_OS_MAC namespace { io_iterator_t gAddedIter; io_iterator_t gRemovedIter; @@ -418,9 +421,11 @@ void deviceDisconnectedCallback(void *refCon, io_iterator_t iterator) } // extern C } // anonymous namespace +#endif void IosDeviceManager::monitorAvailableDevices() { +#ifdef Q_OS_MAC CFMutableDictionaryRef matchingDictionary = IOServiceMatching("IOUSBDevice" ); { @@ -469,7 +474,7 @@ void IosDeviceManager::monitorAvailableDevices() // Iterate once to get already-present devices and arm the notification deviceConnectedCallback(NULL, gAddedIter); deviceDisconnectedCallback(NULL, gRemovedIter); - +#endif } diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index b20e24425fe903a159b6afd2f7ccfdeaa080ad90..39311cdc0f8368ee04893f8024adeaf940ec05bc 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -48,11 +48,8 @@ SUBDIRS = \ todo \ qnx \ clearcase \ - baremetal - -macx { - SUBDIRS += ios -} + baremetal \ + ios isEmpty(QBS_INSTALL_DIR): QBS_INSTALL_DIR = $$(QBS_INSTALL_DIR) exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \