Fix build against Firebase iOS 8.6.0

Fix build against Firebase iOS 8.6.0

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path set. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    # Specify the STL variant that is to be used in the app .pro file with the $$QTFIREBASE_STL_VARIANT variable
    # c++:      LLVM libc++ runtime
    # gnustl:   GNU STL
    # stlport:  STLPort runtime
    android-clang {
        QTFIREBASE_STL_VARIANT = c++
    }

    isEmpty(QTFIREBASE_STL_VARIANT){
        QTFIREBASE_STL_VARIANT = gnustl
    }

    message("Using QTFIREBASE_STL_VARIANT ($$QTFIREBASE_STL_VARIANT)")
    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/$$QTFIREBASE_STL_VARIANT

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    isEmpty(QTFIREBASE_FRAMEWORKS_ROOT) {
        QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/
        message("No QTFIREBASE_FRAMEWORKS_ROOT path set. Using default $$QTFIREBASE_FRAMEWORKS_ROOT")
    } else {
        message("Using QTFIREBASE_FRAMEWORKS_ROOT ($$QTFIREBASE_FRAMEWORKS_ROOT)")
    }

    !exists($$QTFIREBASE_FRAMEWORKS_ROOT) {
        error("$$QTFIREBASE_FRAMEWORKS_ROOT path does not exist. To download iOS SDK run download_firebase_ios.sh\
 in $$PWD/src/ios directory using command line or set the proper path to SDK by setting QTFIREBASE_FRAMEWORKS_ROOT in your project's .pro file")
    }

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$QTFIREBASE_FRAMEWORKS_ROOT/../ \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Google-Mobile-Ads-SDK/GoogleMobileAds.xcframework/ios-arm64_armv7 \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobtestdevices.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmob.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrequest.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbase.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbanner.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobinterstitial.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrewardedvideoad.h \
        \

    SOURCES += \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobtestdevices.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmob.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrequest.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbase.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbanner.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobinterstitial.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrewardedvideoad.cpp \
        \

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseRemoteConfig/FirebaseRemoteConfig.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseRemoteConfig/FirebaseABTesting.xcframework/ios-arm64_armv7 \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x+ to build." )
        message( "Remember to set QMAKE_IOS_DEPLOYMENT_TARGET in your .pro" )
        # Removed due to Qt 5.12 - see https://github.com/Larpon/QtFirebase/issues/106
        # QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        exists($$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseInstanceID.xcframework) {
            LIBS += \
                -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseInstanceID.xcframework/ios-arm64_armv7 \
                -framework FirebaseInstanceID \
                \
        }

        exists($$QTFIREBASE_FRAMEWORKS_ROOT/FirebasePerformance/Protobuf.xcframework) {
            LIBS += \
                -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebasePerformance/Protobuf.xcframework/ios-arm64_armv7 \
                -framework Protobuf \
                \
        }

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseMessaging.xcframework/ios-arm64_armv7 \
            -framework FirebaseMessaging \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        # -framework FirebaseCoreDiagnostics \
        #-framework GoogleDataTransportCCTSupport \

        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseAnalytics.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseCore.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/GoogleUtilities.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/nanopb.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/PromisesObjC.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseInstallations.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/GoogleDataTransport.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/GoogleAppMeasurement.xcframework/ios-arm64_armv7 \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework GoogleDataTransport \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            -framework PromisesObjC \
            -framework FirebaseInstallations \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAuth/FirebaseAuth.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAuth/GTMSessionFetcher.xcframework/ios-arm64_armv7 \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseDatabase/FirebaseDatabase.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseDatabase/leveldb-library.xcframework/ios-arm64_armv7 \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

message("QtFirebase: configuring build for supported Firebase target platform...")

isEmpty(QTFIREBASE_SDK_PATH){
    QTFIREBASE_SDK_PATH = $$PWD/firebase_cpp_sdk
    message("No QTFIREBASE_SDK_PATH path set. Using default (firebase_cpp_sdk) $$QTFIREBASE_SDK_PATH")
} else {
    message("Using QTFIREBASE_SDK_PATH ($$QTFIREBASE_SDK_PATH)")
}

QTFIREBASE_SDK_LIBS_PREFIX = "firebase_"

QML_IMPORT_PATH += $$PWD

INCLUDEPATH += $$PWD

INCLUDEPATH += \
    $$QTFIREBASE_SDK_PATH/include \
    \

HEADERS += \
    $$PWD/src/platformutils.h \
    $$PWD/src/qtfirebase.h \
    $$PWD/src/qtfirebaseservice.h \
    \

SOURCES += \
    $$PWD/src/qtfirebase.cpp \
    $$PWD/src/qtfirebaseservice.cpp \
    \

contains(QTPLUGIN,qtfirebase) {
    HEADERS += $$PWD/src/qtfirebase_plugin.h
    SOURCES += $$PWD/src/qtfirebase_plugin.cpp
}

!ios: {
    SOURCES += \
        $$PWD/src/platformutils.cpp \
    \
}

RESOURCES += \
    $$PWD/qtfirebase.qrc \
    \

android: {

    # Setup tips
    #
    # Add services to xml file
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/AndroidManifest.xml
    #
    # Add the 'onNewIntent' function to your Qt Activity
    # https://github.com/firebase/quickstart-cpp/blob/e8c20f678a06a28ebb73132abcd79d93b27622d9/messaging/testapp/src/android/java/com/google/firebase/example/TestappNativeActivity.java

    message("QtFirebase Android base")
    QT += androidextras gui-private

    # Specify the STL variant that is to be used in the app .pro file with the $$QTFIREBASE_STL_VARIANT variable
    # c++:      LLVM libc++ runtime
    # gnustl:   GNU STL
    # stlport:  STLPort runtime
    android-clang {
        QTFIREBASE_STL_VARIANT = c++
    }

    isEmpty(QTFIREBASE_STL_VARIANT){
        QTFIREBASE_STL_VARIANT = gnustl
    }

    message("Using QTFIREBASE_STL_VARIANT ($$QTFIREBASE_STL_VARIANT)")
    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/android/$$ANDROID_TARGET_ARCH/$$QTFIREBASE_STL_VARIANT

    DEPENDPATH += $$QTFIREBASE_SDK_LIBS_PATH
}

ios: {

    # Setup tips
    #
    # Download the Google Firebase Framework link for Ios
    # and extract the files to this folder $$PWD/src/ios/Firebase/
    # or use your own folder QTFIREBASE_FRAMEWORKS_ROOT = YOUR/PWD
    # https://firebase.google.com/docs/ios/setup#frameworks

    message("QtFirebase iOS base")
    QT += gui_private

    QTFIREBASE_SDK_LIBS_PATH = $$QTFIREBASE_SDK_PATH/libs/ios/universal/

    isEmpty(QTFIREBASE_FRAMEWORKS_ROOT) {
        QTFIREBASE_FRAMEWORKS_ROOT = $$PWD/src/ios/Firebase/
        message("No QTFIREBASE_FRAMEWORKS_ROOT path set. Using default $$QTFIREBASE_FRAMEWORKS_ROOT")
    } else {
        message("Using QTFIREBASE_FRAMEWORKS_ROOT ($$QTFIREBASE_FRAMEWORKS_ROOT)")
    }

    !exists($$QTFIREBASE_FRAMEWORKS_ROOT) {
        error("$$QTFIREBASE_FRAMEWORKS_ROOT path does not exist. To download iOS SDK run download_firebase_ios.sh\
 in $$PWD/src/ios directory using command line or set the proper path to SDK by setting QTFIREBASE_FRAMEWORKS_ROOT in your project's .pro file")
    }

    QMAKE_LFLAGS += -ObjC

    HEADERS += \
        $$PWD/src/ios/AppDelegate.h \
        \

    OBJECTIVE_SOURCES += \
        $$PWD/src/ios/platformutils.mm \
        $$PWD/src/ios/AppDelegate.mm \
        \

    LIBS += \
        -ObjC \
        -lsqlite3 \
        -lz \
        -L$$QTFIREBASE_SDK_LIBS_PATH \
        -framework MediaPlayer \
        -framework CoreMotion \
        -framework CoreTelephony \
        -framework MessageUI \
        -framework GLKit \
        -framework AddressBook \
        -framework UIKit \
        -framework SystemConfiguration \
        \

    INCLUDEPATH += \
        $$QTFIREBASE_SDK_PATH/include \
        $$QTFIREBASE_FRAMEWORKS_ROOT/../ \
        $$PWD/src \
        $$PWD/src/ios \
        \
}

# NOTE the order of linking is important!

PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}app.a
LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app

# AdMob
contains(DEFINES,QTFIREBASE_BUILD_ADMOB) {
    message( "QtFirebase including AdMob" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/Google-Mobile-Ads-SDK/GoogleMobileAds.xcframework/ios-arm64_armv7 \
            -framework GoogleMobileAds \
            -framework AdSupport \
            -framework StoreKit \
            \
    }

    HEADERS += \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobtestdevices.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmob.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrequest.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbase.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbanner.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobinterstitial.h \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrewardedvideoad.h \
        \

    SOURCES += \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobtestdevices.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmob.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrequest.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbase.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobbanner.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobinterstitial.cpp \
        $$PWD/src/qtfirebaseadmob/qtfirebaseadmobrewardedvideoad.cpp \
        \

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}admob.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}admob
}

# Remote Config
contains(DEFINES,QTFIREBASE_BUILD_REMOTE_CONFIG) {
    message( "QtFirebase including RemoteConfig" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseRemoteConfig/FirebaseRemoteConfig.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseRemoteConfig/FirebaseABTesting.xcframework/ios-arm64_armv7 \
            -framework FirebaseABTesting \ # Required for Firebase iOS >= 4.5.0
            -framework FirebaseRemoteConfig \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseremoteconfig.h
    SOURCES += $$PWD/src/qtfirebaseremoteconfig.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}remote_config
}

# Messaging
contains(DEFINES,QTFIREBASE_BUILD_MESSAGING) {
    message( "QtFirebase including Messaging" )

    ios: {
        message( "QtFirebase Messaging requires iOS v10.x+ to build." )
        message( "Remember to set QMAKE_IOS_DEPLOYMENT_TARGET in your .pro" )
        # Removed due to Qt 5.12 - see https://github.com/Larpon/QtFirebase/issues/106
        # QMAKE_IOS_DEPLOYMENT_TARGET = 10.0

        exists($$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseInstanceID.xcframework) {
            LIBS += \
                -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseInstanceID.xcframework/ios-arm64_armv7 \
                -framework FirebaseInstanceID \
                \
        }

        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseMessaging/FirebaseMessaging.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebasePerformance/Protobuf.xcframework/ios-arm64_armv7 \
            -framework FirebaseMessaging \
            -framework Protobuf \
            -framework UserNotifications \
            \
    }

    HEADERS += $$PWD/src/qtfirebasemessaging.h
    SOURCES += $$PWD/src/qtfirebasemessaging.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}messaging.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}messaging
}

# Analytics
contains(DEFINES,QTFIREBASE_BUILD_ANALYTICS) {
    message( "QtFirebase including Analytics" )

    ios: {
        # -framework FirebaseCoreDiagnostics \
        # -framework GoogleDataTransport \
        #-framework GoogleDataTransportCCTSupport \

        LIBS += \
            -framework StoreKit \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseAnalytics.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseCore.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/GoogleUtilities.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/nanopb.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/PromisesObjC.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/FirebaseInstallations.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAnalytics/GoogleAppMeasurement.xcframework/ios-arm64_armv7 \
            -framework FirebaseAnalytics \
            -framework FirebaseCore \
            -framework GoogleAppMeasurement \
            -framework GoogleUtilities \
            -framework nanopb \
            -framework PromisesObjC \
            -framework FirebaseInstallations \
            \
    }

    HEADERS += $$PWD/src/qtfirebaseanalytics.h
    SOURCES += $$PWD/src/qtfirebaseanalytics.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}analytics.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}analytics
}

# Auth
contains(DEFINES,QTFIREBASE_BUILD_AUTH) {
    message( "QtFirebase including Auth" )

    ios: {
        LIBS += \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAuth/FirebaseAuth.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseAuth/GTMSessionFetcher.xcframework/ios-arm64_armv7 \
            -framework FirebaseAuth \
            -framework GTMSessionFetcher \
            -framework SafariServices \ # Required for Firebase iOS >= 4.4.0
        \
    }

    HEADERS += $$PWD/src/qtfirebaseauth.h
    SOURCES += $$PWD/src/qtfirebaseauth.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}auth.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}auth
}

# Database
contains(DEFINES,QTFIREBASE_BUILD_DATABASE) {
    message( "QtFirebase including Database" )

    ios: {
        LIBS += \
            -licucore \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseDatabase/FirebaseDatabase.xcframework/ios-arm64_armv7 \
            -F$$QTFIREBASE_FRAMEWORKS_ROOT/FirebaseDatabase/leveldb-library.xcframework/ios-arm64_armv7 \
            -framework FirebaseDatabase \
            -framework leveldb-library \
        \
    }

    HEADERS += $$PWD/src/qtfirebasedatabase.h
    SOURCES += $$PWD/src/qtfirebasedatabase.cpp

    PRE_TARGETDEPS += $$QTFIREBASE_SDK_LIBS_PATH/lib$${QTFIREBASE_SDK_LIBS_PREFIX}database.a
    LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}database
}

LIBS += -L$$QTFIREBASE_SDK_LIBS_PATH -l$${QTFIREBASE_SDK_LIBS_PREFIX}app


removed extra lines

removed extra lines

message("qtcontacts-tracker.pri")

!contains(DEFINES, QTCONTACTS-TRACKER_PRI) {
message(" ^ including")
DEFINES += QTCONTACTS-TRACKER_PRI

INCLUDEPATH += /usr/include/qt4/QtContacts
INCLUDEPATH += $$PWD

LIBS += -lqttracker
LIBS += -lQtContacts

HEADERS += qcontacttrackerbackend_p.h \
           qtrackercontactasyncrequest.h

SOURCES += qcontacttrackerbackend.cpp \
           qtrackercontactasyncrequest.cpp
}


QmlDesigner: fix compile for Qt 5

QmlDesigner: fix compile for Qt 5

Change-Id: I34282a36db8af9c5550ee4c9080519ce0c096d8e
Reviewed-by: Marco Bubke <5254e489b34ec8bbce36789100e3fc0f41fa62ef@digia.com>
(cherry picked from commit 08af5097597f227fe69339b49c302edc0f5c42dd)

VPATH += $$PWD
INCLUDEPATH += $$PWD
SOURCES += propertyeditor.cpp \
    qmlanchorbindingproxy.cpp \
    resetwidget.cpp \
    qlayoutobject.cpp \
    basiclayouts.cpp \
    basicwidgets.cpp \
    behaviordialog.cpp \
    qproxylayoutitem.cpp \
    layoutwidget.cpp \
    filewidget.cpp \
    propertyeditorvalue.cpp \
    fontwidget.cpp \
    originwidget.cpp \
    siblingcombobox.cpp \
    propertyeditortransaction.cpp \
    propertyeditorcontextobject.cpp \
    declarativewidgetview.cpp \
    gradientlineqmladaptor.cpp

HEADERS += propertyeditor.h \
    qmlanchorbindingproxy.h \
    resetwidget.h \
    qlayoutobject.h \
    basiclayouts.h \
    basicwidgets.h \
    behaviordialog.h \
    qproxylayoutitem.h \
    layoutwidget.h \
    filewidget.h \
    propertyeditorvalue.h \
    fontwidget.h \
    originwidget.h \
    siblingcombobox.h \
    propertyeditortransaction.h \
    designerpropertymap.h \
    propertyeditorcontextobject.h \
    declarativewidgetview.h \
    gradientlineqmladaptor.h

greaterThan(QT_MAJOR_VERSION, 4) {
    QT += quick1
} else {
    QT += declarative
}

RESOURCES += propertyeditor.qrc
FORMS += behaviordialog.ui

VPATH += $$PWD
INCLUDEPATH += $$PWD
SOURCES += propertyeditor.cpp \
    qmlanchorbindingproxy.cpp \
    resetwidget.cpp \
    qlayoutobject.cpp \
    basiclayouts.cpp \
    basicwidgets.cpp \
    behaviordialog.cpp \
    qproxylayoutitem.cpp \
    layoutwidget.cpp \
    filewidget.cpp \
    propertyeditorvalue.cpp \
    fontwidget.cpp \
    originwidget.cpp \
    siblingcombobox.cpp \
    propertyeditortransaction.cpp \
    propertyeditorcontextobject.cpp \
    declarativewidgetview.cpp \
    gradientlineqmladaptor.cpp

HEADERS += propertyeditor.h \
    qmlanchorbindingproxy.h \
    resetwidget.h \
    qlayoutobject.h \
    basiclayouts.h \
    basicwidgets.h \
    behaviordialog.h \
    qproxylayoutitem.h \
    layoutwidget.h \
    filewidget.h \
    propertyeditorvalue.h \
    fontwidget.h \
    originwidget.h \
    siblingcombobox.h \
    propertyeditortransaction.h \
    designerpropertymap.h \
    propertyeditorcontextobject.h \
    declarativewidgetview.h \
    gradientlineqmladaptor.h

QT += declarative
RESOURCES += propertyeditor.qrc
FORMS += behaviordialog.ui


Fix QtAdMob path

Fix QtAdMob path

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h
SOURCES += $$PWD/adctl.cpp

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

android
{
    android:QT += androidextras gui-private
    android:DISTFILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    # make required directories
    DIRS = $$ANDROID_PACKAGE_SOURCE_DIR/libs
    createDirs.commands = $(MKDIR) $$DIRS
    first.depends += createDirs
    android:QMAKE_EXTRA_TARGETS += createDirs

    #copy platform specific data

    #AdMob
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/google-play-services_lib) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/QtAdMob/platform/android/google-play-services_lib $$ANDROID_PACKAGE_SOURCE_DIR;
        copydata.commands += $(COPY_DIR) $$PWD/3rd/QtAdMob/platform/android/src $$ANDROID_PACKAGE_SOURCE_DIR;
    }

    #StartAd
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar $$ANDROID_PACKAGE_SOURCE_DIR/libs/;
    }

    #PlayServices
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar $$ANDROID_PACKAGE_SOURCE_DIR/libs/;
    }

    #AdCtl
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/project.properties) {
        copydata.commands += $(COPY_DIR) $$PWD/platform/android/project.properties $$ANDROID_PACKAGE_SOURCE_DIR;
    }
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk) {
        copydata.commands += $(COPY_DIR) $$PWD/platform/android/src $$ANDROID_PACKAGE_SOURCE_DIR;
    }
    copydata.CONFIG += no_link target_predeps

    #Run data copy and dirs creation
    first.depends += $(first) copydata
    first.CONFIG += no_link target_predeps
    export(first.depends)
    export(copydata.commands)
    android:QMAKE_EXTRA_TARGETS += first copydata
}

ADMOB_PATH = $$PWD/3rd/QtAdMob
GOOGLE_ANALITICS_PATH = $$PWD/3rd/qt-google-analytics

include($$ADMOB_PATH/QtAdMob.pri)
include($$GOOGLE_ANALITICS_PATH/qt-google-analytics.pri)

QT += qml quick widgets

HEADERS += $$PWD/adctl.h
SOURCES += $$PWD/adctl.cpp

INCLUDEPATH += $$ADMOB_PATH
INCLUDEPATH += $$GOOGLE_ANALITICS_PATH

OTHER_FILES += README.md

android
{
    android:QT += androidextras gui-private
    android:DISTFILES += $$ANDROID_PACKAGE_SOURCE_DIR/src/org/dreamdev/QtAdMob/QtAdMobActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/BaseGameUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelper.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/com/google/example/games/basegameutils/GameHelperUtils.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk/AdCtl/AdCtlActivity.java \
                         $$ANDROID_PACKAGE_SOURCE_DIR/res/values/strings.xml \
                         $$ANDROID_PACKAGE_SOURCE_DIR/project.properties \
                         $$ANDROID_PACKAGE_SOURCE_DIR/libs/*

    # make required directories
    DIRS = $$ANDROID_PACKAGE_SOURCE_DIR/libs
    createDirs.commands = $(MKDIR) $$DIRS
    first.depends += createDirs
    android:QMAKE_EXTRA_TARGETS += createDirs

    #copy platform specific data

    #AdMob
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/google-play-services_lib) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/QtAdMob/QtAdMob/platform/android/google-play-services_lib $$ANDROID_PACKAGE_SOURCE_DIR;
        copydata.commands += $(COPY_DIR) $$PWD/3rd/QtAdMob/QtAdMob/platform/android/src $$ANDROID_PACKAGE_SOURCE_DIR;
    }

    #StartAd
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/StartADLib-1.0.1.jar) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/SDK-Android/lib/StartADLib-1.0.1.jar $$ANDROID_PACKAGE_SOURCE_DIR/libs/;
    }

    #PlayServices
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/libs/android-support-v4.jar) {
        copydata.commands += $(COPY_DIR) $$PWD/3rd/android-support-library-archive/v4/android-support-v4.jar $$ANDROID_PACKAGE_SOURCE_DIR/libs/;
    }

    #AdCtl
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/project.properties) {
        copydata.commands += $(COPY_DIR) $$PWD/platform/android/project.properties $$ANDROID_PACKAGE_SOURCE_DIR;
    }
    !exists ($$ANDROID_PACKAGE_SOURCE_DIR/src/ru/forsk) {
        copydata.commands += $(COPY_DIR) $$PWD/platform/android/src $$ANDROID_PACKAGE_SOURCE_DIR;
    }
    copydata.CONFIG += no_link target_predeps

    #Run data copy and dirs creation
    first.depends += $(first) copydata
    first.CONFIG += no_link target_predeps
    export(first.depends)
    export(copydata.commands)
    android:QMAKE_EXTRA_TARGETS += first copydata
}


instructions and changes for static DB4.8

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/../spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.0i --disable-asciidoc --disable-lzma
    LIBS += -L$$PWD/../tor/src/or -ltor \
    -L$$PWD/../tor/src/common -lor \
    -L$$PWD/../tor/src/common -lor-ctime \
    -L$$PWD/../tor/src/common -lor-crypto \
    -L$$PWD/../tor/src/common -lor-event \
    -L$$PWD/../tor/src/trunnel -lor-trunnel \
    -L$$PWD/../tor/src/common -lcurve25519_donna \
    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
    $$PWD/../tor/src/common/libor.a \
    $$PWD/../tor/src/common/libor-ctime.a \
    $$PWD/../tor/src/common/libor-crypto.a \
    $$PWD/../tor/src/common/libor-event.a \
    $$PWD/../tor/src/trunnel/libor-trunnel.a \
    $$PWD/../tor/src/common/libcurve25519_donna.a \
    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # to build BerkeleyDB with autotools, call in subfolder db4.8:
    # ./configure --enable-cxx --disable-shared --disable-replication --with-pic && make
    _BERKELEY_PATH = $$PWD/../db4.8/build_unix
    LIBS += $${_BERKELEY_PATH}/libdb_cxx.a \ # link static
    $${_BERKELEY_PATH}/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}
    INCLUDEPATH += $${_BERKELEY_PATH}

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++14 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.67.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0i
    INCLUDEPATH += "$${_OPENSSL_PATH}/include/"
    LIBS += -L$${_OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads

# 1. Before using autotools & make, make sure to set the macOS target platform in the shell:
# export MACOSX_DEPLOYMENT_TARGET=10.10

# 2. Install all libraries with homebrew:
# brew install autoconf automake libtool pkg-config openssl@1.1 libevent boost gcc wget

# (2a optional) Fix for xCode to stop complaining about not finding the string.h file
# https://stackoverflow.com/questions/48839127/qmake-derived-clang-in-osx-10-13-cannot-find-string-h
# INCLUDEPATH += /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include

ICON = $$PWD/../spectre.icns

    # to build tor with autotools, call in subfolder tor:
    # ./autogen.sh && ./configure --with-ssl-dir=/usr/local/Cellar/openssl@1.1/1.1.0i --disable-asciidoc --disable-lzma
    LIBS += -L$$PWD/../tor/src/or -ltor \
    -L$$PWD/../tor/src/common -lor \
    -L$$PWD/../tor/src/common -lor-ctime \
    -L$$PWD/../tor/src/common -lor-crypto \
    -L$$PWD/../tor/src/common -lor-event \
    -L$$PWD/../tor/src/trunnel -lor-trunnel \
    -L$$PWD/../tor/src/common -lcurve25519_donna \
    -L$$PWD/../tor/src/ext/ed25519/donna -led25519_donna \
    -L$$PWD/../tor/src/ext/ed25519/ref10 -led25519_ref10 \
    -L$$PWD/../tor/src/ext/keccak-tiny -lkeccak-tiny \

    INCLUDEPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny
    DEPENDPATH += $$PWD/../tor/src/or $$PWD/../tor/src/common $$PWD/../tor/src/trunnel $$PWD/../tor/src/ext/ed25519/donna $$PWD/../tor/src/ext/ed25519/ref10 $$PWD/../tor/src/ext/keccak-tiny

    PRE_TARGETDEPS += $$PWD/../tor/src/or/libtor.a \
    $$PWD/../tor/src/common/libor.a \
    $$PWD/../tor/src/common/libor-ctime.a \
    $$PWD/../tor/src/common/libor-crypto.a \
    $$PWD/../tor/src/common/libor-event.a \
    $$PWD/../tor/src/trunnel/libor-trunnel.a \
    $$PWD/../tor/src/common/libcurve25519_donna.a \
    $$PWD/../tor/src/ext/ed25519/donna/libed25519_donna.a \
    $$PWD/../tor/src/ext/ed25519/ref10/libed25519_ref10.a \
    $$PWD/../tor/src/ext/keccak-tiny/libkeccak-tiny.a \

    # brew install zlib
    _ZLIB_PATH = /usr/local/opt/zlib
    INCLUDEPATH += "$${_ZLIB_PATH}/include/"
    LIBS += -L$${_ZLIB_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -lz

    # brew install berkeley-db4
    _BERKELEY_PATH = /usr/local/Cellar/berkeley-db@4/4.8.30
    LIBS += -L$${_BERKELEY_PATH}/lib -ldb_cxx \   # use dynamic libraries
    -L$${_BERKELEY_PATH}/lib -ldb
    #LIBS += $${_BERKELEY_PATH}/lib/libdb_cxx.a \ # link static
    #$${_BERKELEY_PATH}/lib/libdb.a

    DEPENDPATH += $${_BERKELEY_PATH}/lib
    INCLUDEPATH += $${_BERKELEY_PATH}/include

    # to build leveldb call in subfolder leveldb:
    # ./build_detect_platform build_config.mk ./ && make
    LIBS += -L$$PWD/../leveldb/out-static -lleveldb \
    -L$$PWD/../leveldb/out-static -lmemenv

    INCLUDEPATH += $$PWD/../leveldb/out-static
    DEPENDPATH += $$PWD/../leveldb/out-static
    INCLUDEPATH += $$PWD/../leveldb/include
    DEPENDPATH += $$PWD/../leveldb/include
    INCLUDEPATH += $$PWD/../leveldb/helpers
    DEPENDPATH += $$PWD/../leveldb/helpers

    PRE_TARGETDEPS += $$PWD/../leveldb/out-static/libleveldb.a \
    $$PWD/../leveldb/out-static/libmemenv.a

HEADERS +=              $$PWD/qt/macdockiconhandler.h \
                        $$PWD/qt/macnotificationhandler.h \

OBJECTIVE_SOURCES +=    $$PWD/qt/macdockiconhandler.mm \
                        $$PWD/qt/macnotificationhandler.mm \

DEFINES += FORTIFY_SOURCE=1

QMAKE_LFLAGS += -fstack-protector
QMAKE_CXXFLAGS += -pthread -fPIC -fstack-protector -O2 -D_FORTIFY_SOURCE=1 -Wall -Wextra -Wno-ignored-qualifiers -Woverloaded-virtual -Wformat -Wformat-security -Wno-unused-parameter

DEFINES += MAC_OSX
# Mac: compile for maximum compatibility (10.0 Yosemite, 32-bit)
QMAKE_CXXFLAGS += -std=c++14 -mmacosx-version-min=10.10 -isysroot

    # https://www.reddit.com/r/cpp/comments/334s4r/how_to_enable_c14_in_qt_creator_on_a_mac/
    # Turns out, there's a glitch in the Mac version where the standard library isn't correctly included when using the C++14 config flag. Adding this additional line to the .pro file fixes the problem:
    QMAKE_CXXFLAGS += -stdlib=libc++

    #add in core foundation framework
    QMAKE_LFLAGS += -F /System/Library/Frameworks/CoreFoundation.framework/
    LIBS += -framework CoreFoundation

    QMAKE_LFLAGS += -F /System/Library/Frameworks/AppKit.framework/
    LIBS += -framework AppKit

    QMAKE_LFLAGS += -F /System/Library/Frameworks/ApplicationServices.framework/
    LIBS += -framework ApplicationServices

    #brew install boost
    _BOOST_PATH = /usr/local/Cellar/boost/1.67.0_1
    INCLUDEPATH += "$${_BOOST_PATH}/include/"
    LIBS += -L$${_BOOST_PATH}/lib
    LIBS += -lboost_system-mt -lboost_chrono-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_unit_test_framework-mt -lboost_timer-mt # using dynamic lib (not sure if you need that "-mt" at the end or not)
    DEFINES += BOOST_ASIO_ENABLE_OLD_SERVICES BOOST_SPIRIT_THREADSAFE BOOST_THREAD_USE_LIB BOOST_THREAD_POSIX BOOST_HAS_THREADS
    #LIBS += $${_BOOST_PATH}/lib/libboost_chrono-mt.a # using static lib

    #brew install openssl@1.1
    _OPENSSL_PATH = /usr/local/Cellar/openssl@1.1/1.1.0i
    INCLUDEPATH += "$${_OPENSSL_PATH}/include/"
    LIBS += -L$${_OPENSSL_PATH}/lib
    LIBS += -lssl -lcrypto # using dynamic lib (not sure if you need that "-mt" at the end or not)

    #libevent-2.1.6.dylib
    #brew install libevent
    _LIBEVENT_PATH = /usr/local/Cellar/libevent/2.1.8
    INCLUDEPATH += "$${_LIBEVENT_PATH}/include/"
    LIBS += -L$${_LIBEVENT_PATH}/lib
    #Shblis-MacBook-Pro:src Shbli$ find /usr/local/Cellar/libevent/2.1.8/lib/ -name *a
    LIBS += -levent_extra -levent -levent_core -levent_openssl -levent_pthreads


Fixed build under windows

Fixed build under windows

# Copyright 2007-2015 QReal Research Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qslog qrutils qrgui-tool-plugin-interface robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/tool.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/tool.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \

# Copyright 2007-2015 QReal Research Group
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

QT += widgets xml

DEFINES += TWO_D_MODEL_LIBRARY

links(qrkernel qrutils qrgui-tool-plugin-interface robots-utils robots-kit-base)
includes(plugins/robots/common/kitBase)
includes(plugins/robots/utils qrtext)

TRANSLATIONS = \
	$$PWD/../../../../qrtranslations/ru/plugins/robots/twoDModel_ru.ts \
	$$PWD/../../../../qrtranslations/fr/plugins/robots/twoDModel_fr.ts \

HEADERS += \
	$$PWD/include/twoDModel/twoDModelDeclSpec.h \
	$$PWD/include/twoDModel/engine/twoDModelControlInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelDisplayWidget.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineFacade.h \
	$$PWD/include/twoDModel/engine/twoDModelEngineInterface.h \
	$$PWD/include/twoDModel/engine/twoDModelGuiFacade.h \
	$$PWD/include/twoDModel/engine/view/twoDModelWidget.h \
	$$PWD/include/twoDModel/engine/model/constants.h \
	$$PWD/include/twoDModel/engine/model/model.h \
	$$PWD/include/twoDModel/engine/model/worldModel.h \
	$$PWD/include/twoDModel/engine/model/timeline.h \
	$$PWD/include/twoDModel/engine/model/robotModel.h \
	$$PWD/include/twoDModel/engine/model/sensorsConfiguration.h \
	$$PWD/include/twoDModel/engine/model/settings.h \
	$$PWD/include/twoDModel/robotModel/twoDRobotModel.h \
	$$PWD/include/twoDModel/robotModel/parts/button.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorBlue.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorFull.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorGreen.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorPassive.h \
	$$PWD/include/twoDModel/robotModel/parts/colorSensorRed.h \
	$$PWD/include/twoDModel/robotModel/parts/display.h \
	$$PWD/include/twoDModel/robotModel/parts/encoderSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/lightSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/motor.h \
	$$PWD/include/twoDModel/robotModel/parts/rangeSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/touchSensor.h \
	$$PWD/include/twoDModel/robotModel/parts/gyroscope.h \
	$$PWD/include/twoDModel/robotModel/parts/accelerometer.h \
	$$PWD/include/twoDModel/robotModel/parts/marker.h \
	$$PWD/include/twoDModel/blocks/markerDownBlock.h \
	$$PWD/include/twoDModel/blocks/markerUpBlock.h \

HEADERS += \
	$$PWD/src/engine/twoDModelEngineApi.h \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.h \
	$$PWD/src/engine/view/scene/twoDModelScene.h \
	$$PWD/src/engine/view/scene/fakeScene.h \
	$$PWD/src/engine/view/scene/robotItem.h \
	$$PWD/src/engine/view/scene/sensorItem.h \
	$$PWD/src/engine/view/scene/sonarSensorItem.h \
	$$PWD/src/engine/view/parts/palette.h \
	$$PWD/src/engine/view/parts/actionsBox.h \
	$$PWD/src/engine/view/parts/gridParameters.h \
	$$PWD/src/engine/view/parts/detailsTab.h \
	$$PWD/src/engine/view/parts/colorItemPopup.h \
	$$PWD/src/engine/view/parts/robotItemPopup.h \
	$$PWD/src/engine/view/parts/speedPopup.h \
	$$PWD/src/engine/view/parts/ruler.h \
	$$PWD/src/engine/constraints/constraintsChecker.h \
	$$PWD/src/engine/constraints/details/defines.h \
	$$PWD/src/engine/constraints/details/constraintsParser.h \
	$$PWD/src/engine/constraints/details/event.h \
	$$PWD/src/engine/constraints/details/conditionsFactory.h \
	$$PWD/src/engine/constraints/details/triggersFactory.h \
	$$PWD/src/engine/constraints/details/valuesFactory.h \
	$$PWD/src/engine/model/modelTimer.h \
	$$PWD/src/engine/model/physics/physicsEngineBase.h \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.h \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.h \
	$$PWD/src/engine/items/tool.h \
	$$PWD/src/engine/items/solidItem.h \
	$$PWD/src/engine/items/wallItem.h \
	$$PWD/src/engine/items/stylusItem.h \
	$$PWD/src/engine/items/lineItem.h \
	$$PWD/src/engine/items/colorFieldItem.h \
	$$PWD/src/engine/items/ellipseItem.h \
	$$PWD/src/engine/items/startPosition.h \
	$$PWD/src/engine/items/regions/regionItem.h \
	$$PWD/src/engine/items/regions/ellipseRegion.h \
	$$PWD/src/engine/items/regions/rectangularRegion.h \
	$$PWD/src/engine/items/regions/boundRegion.h \
	$$PWD/src/robotModel/nullTwoDRobotModel.h \

SOURCES += \
	$$PWD/src/engine/twoDModelEngineFacade.cpp \
	$$PWD/src/engine/twoDModelEngineApi.cpp \
	$$PWD/src/engine/twoDModelGuiFacade.cpp \
	$$PWD/src/engine/view/twoDModelWidget.cpp \
	$$PWD/src/engine/view/twoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/nullTwoDModelDisplayWidget.cpp \
	$$PWD/src/engine/view/scene/twoDModelScene.cpp \
	$$PWD/src/engine/view/scene/fakeScene.cpp \
	$$PWD/src/engine/view/scene/robotItem.cpp \
	$$PWD/src/engine/view/scene/sensorItem.cpp \
	$$PWD/src/engine/view/scene/sonarSensorItem.cpp \
	$$PWD/src/engine/view/parts/palette.cpp \
	$$PWD/src/engine/view/parts/actionsBox.cpp \
	$$PWD/src/engine/view/parts/gridParameters.cpp \
	$$PWD/src/engine/view/parts/detailsTab.cpp \
	$$PWD/src/engine/view/parts/colorItemPopup.cpp \
	$$PWD/src/engine/view/parts/robotItemPopup.cpp \
	$$PWD/src/engine/view/parts/speedPopup.cpp \
	$$PWD/src/engine/view/parts/ruler.cpp \
	$$PWD/src/engine/model/model.cpp \
	$$PWD/src/engine/model/settings.cpp \
	$$PWD/src/engine/model/robotModel.cpp \
	$$PWD/src/engine/model/modelTimer.cpp \
	$$PWD/src/engine/model/sensorsConfiguration.cpp \
	$$PWD/src/engine/model/worldModel.cpp \
	$$PWD/src/engine/model/timeline.cpp \
	$$PWD/src/engine/model/physics/physicsEngineBase.cpp \
	$$PWD/src/engine/model/physics/simplePhysicsEngine.cpp \
	$$PWD/src/engine/model/physics/realisticPhysicsEngine.cpp \
	$$PWD/src/engine/items/tool.cpp \
	$$PWD/src/engine/items/solidItem.cpp \
	$$PWD/src/engine/items/wallItem.cpp \
	$$PWD/src/engine/items/stylusItem.cpp \
	$$PWD/src/engine/items/lineItem.cpp \
	$$PWD/src/engine/items/colorFieldItem.cpp \
	$$PWD/src/engine/items/ellipseItem.cpp \
	$$PWD/src/engine/items/startPosition.cpp \
	$$PWD/src/engine/items/regions/regionItem.cpp \
	$$PWD/src/engine/items/regions/ellipseRegion.cpp \
	$$PWD/src/engine/items/regions/rectangularRegion.cpp \
	$$PWD/src/engine/items/regions/boundRegion.cpp \
	$$PWD/src/engine/constraints/constraintsChecker.cpp \
	$$PWD/src/engine/constraints/details/constraintsParser.cpp \
	$$PWD/src/engine/constraints/details/event.cpp \
	$$PWD/src/engine/constraints/details/conditionsFactory.cpp \
	$$PWD/src/engine/constraints/details/triggersFactory.cpp \
	$$PWD/src/engine/constraints/details/valuesFactory.cpp \
	$$PWD/src/robotModel/twoDRobotModel.cpp \
	$$PWD/src/robotModel/nullTwoDRobotModel.cpp \
	$$PWD/src/robotModel/parts/button.cpp \
	$$PWD/src/robotModel/parts/colorSensorBlue.cpp \
	$$PWD/src/robotModel/parts/colorSensorFull.cpp \
	$$PWD/src/robotModel/parts/colorSensorGreen.cpp \
	$$PWD/src/robotModel/parts/colorSensorPassive.cpp \
	$$PWD/src/robotModel/parts/colorSensorRed.cpp \
	$$PWD/src/robotModel/parts/display.cpp \
	$$PWD/src/robotModel/parts/encoderSensor.cpp \
	$$PWD/src/robotModel/parts/lightSensor.cpp \
	$$PWD/src/robotModel/parts/motor.cpp \
	$$PWD/src/robotModel/parts/rangeSensor.cpp \
	$$PWD/src/robotModel/parts/touchSensor.cpp \
	$$PWD/src/robotModel/parts/gyroscope.cpp \
	$$PWD/src/robotModel/parts/accelerometer.cpp \
	$$PWD/src/robotModel/parts/marker.cpp \
	$$PWD/src/blocks/markerDownBlock.cpp \
	$$PWD/src/blocks/markerUpBlock.cpp \

FORMS += \
	$$PWD/src/engine/view/twoDModelWidget.ui \


Fix: building the tracker direct driver into libqtsparql.so.

# if sparql-drivers contains the driver name, we build the driver into QtSparql library.

contains(sparql-drivers, all ) {
    sparql-driver +=   tracker tracker_direct virtuoso endpoint
}

contains(sparql-drivers, tracker) {
    HEADERS +=      drivers/tracker/qsparql_tracker_p.h
    SOURCES +=      drivers/tracker/qsparql_tracker.cpp
    DEFINES += QT_SPARQL_TRACKER

    QT += dbus
}

contains(sparql-drivers, tracker_direct) {
    HEADERS +=      drivers/tracker_direct/qsparql_tracker_direct_p.h
    SOURCES +=      drivers/tracker_direct/qsparql_tracker_direct.cpp
    CONFIG += link_pkgconfig
    PKGCONFIG += tracker-sparql-0.9
    DEFINES += QT_SPARQL_TRACKER_DIRECT
}

contains(sparql-drivers, virtuoso) {
     HEADERS += drivers/virtuoso/qsparql_virtuoso.h
     SOURCES += drivers/virtuoso/qsparql_virtuoso.cpp

     mac:!contains( LIBS, .*odbc.* ):LIBS        *= -liodbc
     unix:!contains( LIBS, .*odbc.* ):LIBS       *= -lodbc

     win32 {
         !win32-borland:LIBS     *= -lodbc32
         win32-borland:LIBS      *= $(BCB)/lib/PSDK/odbc32.lib
     }
     DEFINES += QT_SPARQL_VIRTUOSO
}

contains(sparql-drivers, endpoint) {
    HEADERS +=      drivers/endpoint/qsparql_endpoint.h
    SOURCES +=      drivers/endpoint/qsparql_endpoint.cpp
    DEFINES += QT_SPARQL_ENDPOINT
}

# if sparql-drivers contains the driver name, we build the driver into QtSparql library.

contains(sparql-drivers, all ) {
    sparql-driver +=   tracker tracker_direct virtuoso endpoint
}

contains(sparql-drivers, tracker) {
    HEADERS +=      drivers/tracker/qsparql_tracker_p.h
    SOURCES +=      drivers/tracker/qsparql_tracker.cpp
    DEFINES += QT_SPARQL_TRACKER

    QT += dbus
}

contains(sparql-drivers, tracker_direct) {
    HEADERS +=      drivers/tracker_direct/qsparql_tracker_direct_p.h
    SOURCES +=      drivers/tracker_direct/qsparql_tracker_direct.cpp
    DEFINES += QT_SPARQL_TRACKER_DIRECT
    LIBS *= $$QT_LFLAGS_TRACKER_DIRECT
    QMAKE_CXXFLAGS *= $$QT_CFLAGS_TRACKER_DIRECT
}

contains(sparql-drivers, virtuoso) {
     HEADERS += drivers/virtuoso/qsparql_virtuoso.h
     SOURCES += drivers/virtuoso/qsparql_virtuoso.cpp

     mac:!contains( LIBS, .*odbc.* ):LIBS        *= -liodbc
     unix:!contains( LIBS, .*odbc.* ):LIBS       *= -lodbc

     win32 {
         !win32-borland:LIBS     *= -lodbc32
         win32-borland:LIBS      *= $(BCB)/lib/PSDK/odbc32.lib
     }
     DEFINES += QT_SPARQL_VIRTUOSO
}

contains(sparql-drivers, endpoint) {
    HEADERS +=      drivers/endpoint/qsparql_endpoint.h
    SOURCES +=      drivers/endpoint/qsparql_endpoint.cpp
    DEFINES += QT_SPARQL_ENDPOINT
}


* Clean up pri

* Clean up pri

!contains(ATHENA_PRO, true): {
    INCLUDEPATH += $$PWD/include
    mac:INCLUDEPATH += /usr/local/include
    mac:LIBS += -L/usr/local/lib
    !contains(CONFIG, -std=c++11):CONFIG += -std=c++11
    mac:QMAKE_CXXFLAGS += -stdlib=libc++
}

include(extern/lzo/lzo.pri)

ATHENA_CORE=true

SOURCES += \
    $$PWD/src/Athena/Utility.cpp \
    $$PWD/src/Athena/FileReader.cpp \
    $$PWD/src/Athena/FileWriter.cpp \
    $$PWD/src/Athena/MemoryReader.cpp \
    $$PWD/src/Athena/MemoryWriter.cpp \
    $$PWD/src/Athena/Global.cpp \
    $$PWD/src/Athena/Checksums.cpp \
    $$PWD/src/Athena/Compression.cpp \
    $$PWD/src/LZ77/LZLookupTable.cpp \
    $$PWD/src/LZ77/LZType10.cpp \
    $$PWD/src/LZ77/LZType11.cpp \
    $$PWD/src/LZ77/LZBase.cpp

win32:SOURCES += \
    $$PWD/src/win32_largefilewrapper.c

mac:SOURCES += \
    $$PWD/src/osx_largefilewrapper.c

HEADERS += \
    $$PWD/include/Athena/IStream.hpp \
    $$PWD/include/Athena/IStreamReader.hpp \
    $$PWD/include/Athena/IStreamWriter.hpp \
    $$PWD/include/Athena/Types.hpp \
    $$PWD/include/Athena/Utility.hpp \
    $$PWD/include/Athena/Global.hpp \
    $$PWD/include/Athena/Exception.hpp \
    $$PWD/include/Athena/FileNotFoundException.hpp \
    $$PWD/include/Athena/IOException.hpp \
    $$PWD/include/Athena/InvalidDataException.hpp \
    $$PWD/include/Athena/InvalidOperationException.hpp \
    $$PWD/include/Athena/FileReader.hpp \
    $$PWD/include/Athena/FileWriter.hpp \
    $$PWD/include/Athena/MemoryReader.hpp \
    $$PWD/include/Athena/MemoryWriter.hpp \
    $$PWD/include/Athena/NotImplementedException.hpp \
    $$PWD/include/Athena/Checksums.hpp \
    $$PWD/include/Athena/Compression.hpp \
    $$PWD/include/LZ77/LZBase.hpp \
    $$PWD/include/LZ77/LZLookupTable.hpp \
    $$PWD/include/LZ77/LZType10.hpp \
    $$PWD/include/LZ77/LZType11.hpp \
    $$PWD/include/utf8.h \
    $$PWD/include/utf8/checked.h \
    $$PWD/include/utf8/core.h \
    $$PWD/include/utf8/unchecked.h

win32:HEADERS += \
    $$PWD/include/win32_largefilewrapper.h

mac:HEADERS += \
    $$PWD/include/osx_largefilewrapper.h

!contains(ATHENA_PRO, true): {
    INCLUDEPATH += $$PWD/include
    mac:INCLUDEPATH += /usr/local/include
    unix:LIBS += -lz
    mac:LIBS += -L/usr/local/lib -lz
    QMAKE_CXXFLAGS += -std=c++11
    mac:QMAKE_CXXFLAGS += -stdlib=libc++
}

include(extern/lzo/lzo.pri)

ATHENA_CORE=true

SOURCES += \
    $$PWD/src/Athena/Utility.cpp \
    $$PWD/src/Athena/FileReader.cpp \
    $$PWD/src/Athena/FileWriter.cpp \
    $$PWD/src/Athena/MemoryReader.cpp \
    $$PWD/src/Athena/MemoryWriter.cpp \
    $$PWD/src/Athena/Global.cpp \
    $$PWD/src/Athena/Checksums.cpp \
    $$PWD/src/Athena/Compression.cpp \
    $$PWD/src/LZ77/LZLookupTable.cpp \
    $$PWD/src/LZ77/LZType10.cpp \
    $$PWD/src/LZ77/LZType11.cpp \
    $$PWD/src/LZ77/LZBase.cpp

win32:SOURCES += \
    $$PWD/src/win32_largefilewrapper.c

mac:SOURCES += \
    $$PWD/src/osx_largefilewrapper.c

HEADERS += \
    $$PWD/include/Athena/IStream.hpp \
    $$PWD/include/Athena/IStreamReader.hpp \
    $$PWD/include/Athena/IStreamWriter.hpp \
    $$PWD/include/Athena/Types.hpp \
    $$PWD/include/Athena/Utility.hpp \
    $$PWD/include/Athena/Global.hpp \
    $$PWD/include/Athena/Exception.hpp \
    $$PWD/include/Athena/FileNotFoundException.hpp \
    $$PWD/include/Athena/IOException.hpp \
    $$PWD/include/Athena/InvalidDataException.hpp \
    $$PWD/include/Athena/InvalidOperationException.hpp \
    $$PWD/include/Athena/FileReader.hpp \
    $$PWD/include/Athena/FileWriter.hpp \
    $$PWD/include/Athena/MemoryReader.hpp \
    $$PWD/include/Athena/MemoryWriter.hpp \
    $$PWD/include/Athena/NotImplementedException.hpp \
    $$PWD/include/Athena/Checksums.hpp \
    $$PWD/include/Athena/Compression.hpp \
    $$PWD/include/LZ77/LZBase.hpp \
    $$PWD/include/LZ77/LZLookupTable.hpp \
    $$PWD/include/LZ77/LZType10.hpp \
    $$PWD/include/LZ77/LZType11.hpp \
    $$PWD/include/utf8.h \
    $$PWD/include/utf8/checked.h \
    $$PWD/include/utf8/core.h \
    $$PWD/include/utf8/unchecked.h

win32:HEADERS += \
    $$PWD/include/win32_largefilewrapper.h

mac:HEADERS += \
    $$PWD/include/osx_largefilewrapper.h


Version 0.128

Version 0.128


increase version

increase version


Version 8.50

Version 8.50


Version 8.57

Version 8.57


Version 0.131

Version 0.131


Check for more SSL options in QT_CONFIG

Check for more SSL options in QT_CONFIG

HEADERS += $$PWD/duperagent.h \
    $$PWD/qpm.h \
    $$PWD/request.h \
    $$PWD/response.h \
    $$PWD/serialization.h \
    $$PWD/jsvalueiterator.h \
    $$PWD/config.h \
    $$PWD/cookiejar.h \
    $$PWD/promise.h

SOURCES += $$PWD/duperagent.cpp \
    $$PWD/request.cpp \
    $$PWD/response.cpp \
    $$PWD/serialization.cpp \
    $$PWD/config.cpp \
    $$PWD/cookiejar.cpp \
    $$PWD/promise.cpp

contains(QT_CONFIG, ssl) | contains(QT_CONFIG, openssl) | contains(QT_CONFIG, openssl-linked) {
    HEADERS += $$PWD/ssl.h
    SOURCES += $$PWD/ssl.cpp
}

HEADERS += $$PWD/duperagent.h \
    $$PWD/qpm.h \
    $$PWD/request.h \
    $$PWD/response.h \
    $$PWD/serialization.h \
    $$PWD/jsvalueiterator.h \
    $$PWD/config.h \
    $$PWD/cookiejar.h \
    $$PWD/promise.h

SOURCES += $$PWD/duperagent.cpp \
    $$PWD/request.cpp \
    $$PWD/response.cpp \
    $$PWD/serialization.cpp \
    $$PWD/config.cpp \
    $$PWD/cookiejar.cpp \
    $$PWD/promise.cpp

contains(QT_CONFIG, ssl) {
    HEADERS += $$PWD/ssl.h
    SOURCES += $$PWD/ssl.cpp
}


Changed the path to look for dependencies on Windows using QT

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/megaapi.cpp \
    src/megaapi_impl.cpp \
    bindings/qt/QTMegaRequestListener.cpp \
    bindings/qt/QTMegaTransferListener.cpp \
    bindings/qt//QTMegaGlobalListener.cpp \
    bindings/qt/QTMegaSyncListener.cpp \
    bindings/qt/QTMegaListener.cpp \
    bindings/qt/QTMegaEvent.cpp \
    src/mega_utf8proc.cpp

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv
    }
    else {
        LIBS += -luv
    }
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h \
            include/mega/mega_utf8proc.h

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC
LIBS += -lcryptopp
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cryptopp
    DEFINES += PCRE_STATIC

    contains(CONFIG, BUILDX64) {
	release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64"
	}
	else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x64d"
	}
    }

    !contains(CONFIG, BUILDX64) {
	release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32"
	}
        else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/x32d"
        }
    }

    LIBS += -lshlwapi -lws2_32 -luser32
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += /usr/include/cryptopp

   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include
    LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto -lcares
   }
   else {
    LIBS += -lcurl -lz -lssl -lcrypto -lcares
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cryptopp
   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/qt/libs/sqlite3.c
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   DEFINES += PCRE_STATIC _DARWIN_FEATURE_64_BIT_INODE
   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto
}

MEGASDK_BASE_PATH = $$PWD/../../

VPATH += $$MEGASDK_BASE_PATH
SOURCES += src/attrmap.cpp \
    src/backofftimer.cpp \
    src/base64.cpp \
    src/command.cpp \
    src/commands.cpp \
    src/db.cpp \
    src/gfx.cpp \
    src/file.cpp \
    src/fileattributefetch.cpp \
    src/filefingerprint.cpp \
    src/filesystem.cpp \
    src/http.cpp \
    src/json.cpp \
    src/megaclient.cpp \
    src/node.cpp \
    src/pubkeyaction.cpp \
    src/request.cpp \
    src/serialize64.cpp \
    src/share.cpp \
    src/sharenodekeys.cpp \
    src/sync.cpp \
    src/transfer.cpp \
    src/transferslot.cpp \
    src/treeproc.cpp \
    src/user.cpp \
    src/utils.cpp \
    src/logging.cpp \
    src/waiterbase.cpp  \
    src/proxy.cpp \
    src/pendingcontactrequest.cpp \
    src/crypto/cryptopp.cpp  \
    src/db/sqlite.cpp  \
    src/gfx/qt.cpp \
    src/gfx/external.cpp \
    src/thread/qtthread.cpp \
    src/megaapi.cpp \
    src/megaapi_impl.cpp \
    bindings/qt/QTMegaRequestListener.cpp \
    bindings/qt/QTMegaTransferListener.cpp \
    bindings/qt//QTMegaGlobalListener.cpp \
    bindings/qt/QTMegaSyncListener.cpp \
    bindings/qt/QTMegaListener.cpp \
    bindings/qt/QTMegaEvent.cpp \
    src/mega_utf8proc.cpp

# CONFIG += USE_LIBUV
CONFIG(USE_LIBUV) {
    SOURCES += src/mega_http_parser.cpp
    DEFINES += HAVE_LIBUV
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/libuv
    win32 {
        LIBS += -llibuv
    }
    else {
        LIBS += -luv
    }
}

win32 {
    # comment this line to use WinHTTP on Windows
    CONFIG += USE_CURL

    CONFIG(USE_CURL) {
        SOURCES += src/wincurl/net.cpp  \
            src/wincurl/fs.cpp  \
            src/wincurl/waiter.cpp
        HEADERS += include/mega/wincurl/meganet.h
        DEFINES += USE_CURL
        LIBS +=  -llibcurl -lcares -llibeay32 -lssleay32
    }
    else {
        SOURCES += src/win32/net.cpp \
            src/win32/fs.cpp \
            src/win32/waiter.cpp
        HEADERS += include/mega/win32/meganet.h
    }

    # link winhttp anyway (required for automatic proxy detection)
    LIBS += -lwinhttp
}

unix {
SOURCES += src/posix/net.cpp  \
    src/posix/fs.cpp  \
    src/posix/waiter.cpp
}

HEADERS  += include/mega.h \
            include/mega/account.h \
            include/mega/attrmap.h \
            include/mega/backofftimer.h \
            include/mega/base64.h \
            include/mega/command.h \
            include/mega/console.h \
            include/mega/db.h \
            include/mega/gfx.h \
            include/mega/file.h \
            include/mega/fileattributefetch.h \
            include/mega/filefingerprint.h \
            include/mega/filesystem.h \
            include/mega/http.h \
            include/mega/json.h \
            include/mega/megaapp.h \
            include/mega/megaclient.h \
            include/mega/node.h \
            include/mega/pubkeyaction.h \
            include/mega/request.h \
            include/mega/serialize64.h \
            include/mega/share.h \
            include/mega/sharenodekeys.h \
            include/mega/sync.h \
            include/mega/transfer.h \
            include/mega/transferslot.h \
            include/mega/treeproc.h \
            include/mega/types.h \
            include/mega/user.h \
            include/mega/utils.h \
            include/mega/logging.h \
            include/mega/waiter.h \
            include/mega/proxy.h \
            include/mega/pendingcontactrequest.h \
            include/mega/crypto/cryptopp.h  \
            include/mega/db/sqlite.h  \
            include/mega/gfx/qt.h \
            include/mega/gfx/external.h \
            include/mega/thread.h \
            include/mega/thread/qtthread.h \
            include/megaapi.h \
            include/megaapi_impl.h \
            bindings/qt/QTMegaRequestListener.h \
            bindings/qt/QTMegaTransferListener.h \
            bindings/qt//QTMegaGlobalListener.h \
            bindings/qt/QTMegaSyncListener.h \
            bindings/qt/QTMegaListener.h \
            bindings/qt/QTMegaEvent.h \
            include/mega/mega_utf8proc.h

win32 {
    HEADERS  += include/mega/win32/megasys.h  \
            include/mega/win32/megafs.h  \
            include/mega/win32/megawaiter.h

    SOURCES += bindings/qt/3rdparty/libs/sqlite3.c
}

unix {
    !exists($$MEGASDK_BASE_PATH/include/mega/config.h) {
        error("Configuration file not found! Please re-run configure script located in the project's root directory!")
    }
    HEADERS  += include/mega/posix/meganet.h  \
            include/mega/posix/megasys.h  \
            include/mega/posix/megafs.h  \
            include/mega/posix/megawaiter.h \
            include/mega/config.h
}

DEFINES += USE_SQLITE USE_CRYPTOPP USE_QT MEGA_QT_LOGGING ENABLE_SYNC
LIBS += -lcryptopp
INCLUDEPATH += $$MEGASDK_BASE_PATH/include
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt
INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include

!release {
    DEFINES += SQLITE_DEBUG DEBUG
}
else {
    DEFINES += NDEBUG
}

win32 {
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/zlib
    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/../src/qtbase/src/3rdparty/zlib

    CONFIG(USE_CURL) {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/wincurl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/openssl
        INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cares
    }
    else {
        INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/win32
    }

    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cryptopp
    DEFINES += PCRE_STATIC

    contains(CONFIG, BUILDX64) {
	release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/static_x64"
	}
	else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/staticd_x64"
	}
    }

    !contains(CONFIG, BUILDX64) {
	release {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/static"
	}
	else {
            LIBS += -L"$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/staticd"
	}
    }

    LIBS += -lshlwapi -lws2_32 -luser32
}

unix:!macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += /usr/include/cryptopp

   LIBS += -lsqlite3 -lrt

   exists($$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a) {
    INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include
    LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto -lcares
   }
   else {
    LIBS += -lcurl -lz -lssl -lcrypto -lcares
   }
}

macx {
   INCLUDEPATH += $$MEGASDK_BASE_PATH/include/mega/posix
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/cryptopp
   SOURCES += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/qt/libs/sqlite3.c
   INCLUDEPATH += $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/include/curl
   DEFINES += PCRE_STATIC _DARWIN_FEATURE_64_BIT_INODE
   LIBS += -L$$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/ $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcares.a $$MEGASDK_BASE_PATH/bindings/qt/3rdparty/libs/libcurl.a -lz -lssl -lcrypto
}


Use pkg-config to find PythonQt

Use pkg-config to find PythonQt

# Add debug if debugmode (only default on for windows)
dbg_ext =
win32:CONFIG(debug, debug|release):dbg_ext = _d
unix:CONFIG(debug, debug|release):dbg_ext =

# Set hompath and libname
pythonqt_home = $${PWD}/pythonqt
pythonqt_lib = $${pythonqt_home}/lib
libname = PythonQt

defineTest(have_local_pythonqt) {
  exists($${pythonqt_lib}) {
    return(true)
  }
  return(false)
}

defineTest(have_system_pythonqt) {
  packagesExist(PythonQt-Qt5-Python3) {
    return(true)
  }
  return(false)
}

defineTest(have_pythonqt) {
  have_local_pythonqt() {
    return(true)
  }
  have_system_pythonqt() {
    return(true)
  }
  return(false)
}

have_local_pythonqt() {
  INCLUDEPATH *= $${pythonqt_home}/include
  #TODO Use prf instead
  exists($${pythonqt_lib}/libPythonQt-Qt5-Python3$${dbg_ext}.so) {
    LIBS *= -L$${pythonqt_lib} -lPythonQt-Qt5-Python3$${dbg_ext}
    PYTHONQT_PYVERSION=3
    export(PYTHONQT_PYVERSION)
  } else {
    PYTHONQT_PYVERSION=2
    export(PYTHONQT_PYVERSION)
    LIBS *= -L$${pythonqt_lib} -l$${libname}$${dbg_ext}
  }
  # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
  QMAKE_RPATHDIR *= $${pythonqt_lib}
  message(Found local PythonQt)
} else:have_system_pythonqt() {
  CONFIG *= link_pkgconfig
  PKGCONFIG *= PythonQt-Qt5-Python3
  PYTHONQT_PYVERSION=3
  export(PYTHONQT_PYVERSION)
  message(Found system pkg-config PythonQt)
}

# Add debug if debugmode (only default on for windows)
dbg_ext =
win32:CONFIG(debug, debug|release):dbg_ext = _d
unix:CONFIG(debug, debug|release):dbg_ext =

# By default assume Python version 2
PYTHONQT_PYVERSION=2
export(PYTHONQT_PYVERSION)

# Set hompath and libname
pythonqt_home = $${PWD}/pythonqt
pythonqt_lib = $${pythonqt_home}/lib
libname = PythonQt

defineTest(have_local_pythonqt) {
  exists($${pythonqt_lib}) {
    return(true)
  }
  return(false)
}

defineTest(have_system_pythonqt) {
  unix:system(ldconfig -p | grep -q lib$${libname}) {
    return(true)
  }
  return(false)
}

defineTest(have_pythonqt) {
  have_local_pythonqt() {
    return(true)
  }
  have_system_pythonqt() {
    return(true)
  }
  return(false)
}

have_local_pythonqt() {
  INCLUDEPATH *= $${pythonqt_home}/include
  #TODO Use prf instead
  exists($${pythonqt_lib}/libPythonQt-Qt5-Python3$${dbg_ext}.so) {
    LIBS *= -L$${pythonqt_lib} -lPythonQt-Qt5-Python3$${dbg_ext}
    PYTHONQT_PYVERSION=3
    export(PYTHONQT_PYVERSION)
  } else {
    LIBS *= -L$${pythonqt_lib} -l$${libname}$${dbg_ext}
  }
  # Note! The RPATH is absolute and only meant for dev builds in the IDE, on release runtime paths should be stripped
  QMAKE_RPATHDIR *= $${pythonqt_lib}
  message(Found local PythonQt)
} else:have_system_pythonqt() {
  LIBS += -l$${libname}
  message(Found system ldconfig PythonQt)
}


[GCC] Disabled warning: dereferencing type-punned pointer will break	strict-aliasing rules

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 0
VERSION_MINOR = 1

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc2008|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32-msvc2008 {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += -wd4100 -Zi
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG

  QMAKE_CXXFLAGS_RELEASE -= -O2
  # don't set -GL - bug in msvc
  QMAKE_CXXFLAGS_RELEASE += -Ox -Ob2 -Oi -Ot
  # don't set /LTCG - bug in msvc
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86
 }

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare -Wno-strict-aliasing
#  QMAKE_CXXFLAGS_RELEASE += -g
  # experimental
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-g++ {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
  QMAKE_CFLAGS *= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
}

# This file is a template commmon for all qmake projects.
#
# To use it, define ROOT_DIR variable and include($$ROOT_DIR/common.pri)

# our own version variables
VERSION_MAJOR = 0
VERSION_MINOR = 1

# qt's variable
VERSION = $${VERSION_MAJOR}.$${VERSION_MINOR}

# Additional include directories, common to most projects.
INCLUDEPATH += $$ROOT_DIR/3party/boost

CONFIG(release, debug|release) {
  DEFINES += RELEASE _RELEASE
  CONFIG_NAME = release
} else {
  DEFINES += DEBUG _DEBUG
  CONFIG_NAME = debug
}

BINARIES_PATH = $$ROOT_DIR/out/$$CONFIG_NAME
TEMP_PATH = $$ROOT_DIR/out/$$CONFIG_NAME/tmp/$$TARGET

DESTDIR = $$BINARIES_PATH
OBJECTS_DIR = $$TEMP_PATH
RCC_DIR = $$TEMP_PATH
MOC_DIR = $$TEMP_PATH
UI_DIR = $$TEMP_PATH

LIBS += -L$$BINARIES_PATH

# By default, do not include base QT classes in any project.
QT -= core gui

# Turn on compiler warnings.
CONFIG += warn_on

# Libraries' dependencies hack.
win32-msvc2008|symbian {
  LIB_EXT = .lib
  LIB_PREFIX =
}
unix|win32-g++|bada-simulator {
 LIB_EXT = .a
 LIB_PREFIX = lib
}

# Add libraries' dependencies.
for(project, DEPENDENCIES) {
  PRE_TARGETDEPS += $$BINARIES_PATH/$$LIB_PREFIX$$project$$LIB_EXT
  LIBS += -l$$project
}

INCLUDEPATH += $$ROOT_DIR/3party/protobuf/src/

# Windows-specific options for all projects
win32-msvc2008 {
  QMAKE_CLEAN += *.user
  DEFINES += _SCL_SECURE_NO_WARNINGS _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_WARNINGS NOMINMAX NO_MIN_MAX
  QMAKE_CXXFLAGS += -wd4100 -Zi
  QMAKE_CXXFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_CFLAGS += /Fd$${DESTDIR}/$${TARGET}.pdb
  QMAKE_LFLAGS += /PDB:$${DESTDIR}/$${TARGET}.pdb /DEBUG

  QMAKE_CXXFLAGS_RELEASE -= -O2
  # don't set -GL - bug in msvc
  QMAKE_CXXFLAGS_RELEASE += -Ox -Ob2 -Oi -Ot
  # don't set /LTCG - bug in msvc
  QMAKE_LFLAGS_RELEASE += /MACHINE:X86
 }

unix|win32-g++ {
  QMAKE_CXXFLAGS_WARN_ON += -Wno-sign-compare
#  QMAKE_CXXFLAGS_RELEASE += -g
  # experimental
  QMAKE_CFLAGS_RELEASE *= -ffast-math
  QMAKE_CXXFLAGS_RELEASE *= -ffast-math
}

win32-g++ {
  QMAKE_CFLAGS *= -Wextra
  QMAKE_CXXFLAGS *= -Wextra
}

macx-g++ {
  # minimum supported Mac OS X version
  QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
  QMAKE_CFLAGS *= -mmacosx-version-min=10.5
  QMAKE_CXXFLAGS *= -mmacosx-version-min=10.5
}


Bumped version for release.

Bumped version for release.

Signed-off-by: Carl Wong <71f6120c3829ee10a91638f591f6c67d26f52dda@intel.com>


Bump version to 0.2.7

Bump version to 0.2.7


Fixed code coverage compilation flags

Fixed code coverage compilation flags

# Include global vars
include($$PWD/../globals.pri)

# Include to compile with code coverage flags (gcov)
contains(catchTests, true) {
    CONFIG(debug, debug|release) {
        message(Activating gcov coverage compiler flags -> $$TARGET)
        QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
        equals(QMAKE_CXX, g++): QMAKE_LFLAGS += -lgcov
        QMAKE_LFLAGS += --coverage
        # Add clean -> remove .gcda .gcno
        for(source, SOURCES) {
            gcnoFile = $$replace(source, .cpp, .gcno)
            gcnaFile = $$replace(source, .cpp, .gcda)
            QMAKE_CLEAN += $$OUT_PWD/$$basename(gcnaFile)
            QMAKE_CLEAN += $$OUT_PWD/$$basename(gcnoFile)
        }
    }
}


added none to path to fix warnings

added none to path to fix warnings

include(../paths.pri)
TARGETPATH = $$replace(uri, \\., /)
DESTDIR = $$OUT_PWD/../../imports/$$TARGETPATH

isEmpty(PLUGIN_VERSION): PLUGIN_VERSION = 1.0

# ========== copy additional files ==========

copyqmlinfra.input = QML_INFRA_FILES
copyqmlinfra.output = $$OUT_PWD/../../imports/$$TARGETPATH/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
copyqmlinfra.commands = $$QMAKE_MKDIR $$dirname(copyqmlinfra.output) $$escape_expand(\n\t) \
                        $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlinfra.CONFIG += no_link no_clean
copyqmlinfra.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlinfra

copyqmldesigner.input = QML_DESIGNER_FILES
copyqmldesigner.output = $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.commands = $(COPY_DIR) ${QMAKE_FILE_IN} $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.CONFIG += no_link no_clean
copyqmldesigner.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmldesigner

copyqmlpropertyeditor.input = QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor.output = $$OUT_PWD/../../imports/$$TARGETPATH/propertyEditorQmlSources/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
copyqmlpropertyeditor.commands = $$QMAKE_MKDIR $$dirname(copyqmlpropertyeditor.output) $$escape_expand(\n\t) \
                                 $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlpropertyeditor.CONFIG += no_link no_clean
copyqmlpropertyeditor.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlpropertyeditor

!android: !ios: {
    QMAKE_POST_LINK += $$dirname(QMAKE_QMAKE)/qmlplugindump "$$uri $$PLUGIN_VERSION $$OUT_PWD/../../imports/ > $$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes"
}

QMAKE_CLEAN += -r $$OUT_PWD/../../imports/$$TARGETPATH/

# ========== install additional files ==========
!android: !ios: {
    copypluginqmltypes.CONFIG = no_files no_path
    copypluginqmltypes.extra = $$QMAKE_MKDIR $$[QT_INSTALL_QML]/$$TARGETPATH/ $$escape_expand(\n\t) \
                               $$QMAKE_COPY $$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes $$[QT_INSTALL_QML]/$$TARGETPATH/plugins.qmltypes
    copypluginqmltypes.path = none
    INSTALLS += copypluginqmltypes
}

copyqmlinfra_install.files = $$QML_INFRA_FILES
copyqmlinfra_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmlinfra_install

copyqmldesigner_install.files = $$QML_DESIGNER_FILES
copyqmldesigner_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmldesigner_install

copyqmlpropertyeditor_install.files = $$QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qmldesigner/propertyEditorQmlSources/$$TARGETPATH
INSTALLS += copyqmlpropertyeditor_install

target.path = $$[QT_INSTALL_QML]/$$TARGETPATH

INSTALLS += target

OTHER_FILES += $$QML_INFRA_FILES $$QML_DESIGNER_FILES $$QML_PROPERTY_EDITOR_FILES

include(../paths.pri)
TARGETPATH = $$replace(uri, \\., /)
DESTDIR = $$OUT_PWD/../../imports/$$TARGETPATH

isEmpty(PLUGIN_VERSION): PLUGIN_VERSION = 1.0

# ========== copy additional files ==========

copyqmlinfra.input = QML_INFRA_FILES
copyqmlinfra.output = $$OUT_PWD/../../imports/$$TARGETPATH/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
copyqmlinfra.commands = $$QMAKE_MKDIR $$dirname(copyqmlinfra.output) $$escape_expand(\n\t) \
                        $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlinfra.CONFIG += no_link no_clean
copyqmlinfra.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlinfra

copyqmldesigner.input = QML_DESIGNER_FILES
copyqmldesigner.output = $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.commands = $(COPY_DIR) ${QMAKE_FILE_IN} $$OUT_PWD/../../imports/$$TARGETPATH/designer/
copyqmldesigner.CONFIG += no_link no_clean
copyqmldesigner.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmldesigner

copyqmlpropertyeditor.input = QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor.output = $$OUT_PWD/../../imports/$$TARGETPATH/propertyEditorQmlSources/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT}
copyqmlpropertyeditor.commands = $$QMAKE_MKDIR $$dirname(copyqmlpropertyeditor.output) $$escape_expand(\n\t) \
                                 $$QMAKE_COPY ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
copyqmlpropertyeditor.CONFIG += no_link no_clean
copyqmlpropertyeditor.variable_out = PRE_TARGETDEPS
QMAKE_EXTRA_COMPILERS += copyqmlpropertyeditor

!android: !ios: {
    QMAKE_POST_LINK += $$dirname(QMAKE_QMAKE)/qmlplugindump "$$uri $$PLUGIN_VERSION $$OUT_PWD/../../imports/ > $$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes"
}

QMAKE_CLEAN += -r $$OUT_PWD/../../imports/$$TARGETPATH/

# ========== install additional files ==========
!android: !ios: {
    copypluginqmltypes.CONFIG = no_files no_path
    copypluginqmltypes.extra = $$QMAKE_MKDIR $$[QT_INSTALL_QML]/$$TARGETPATH/ $$escape_expand(\n\t) \
                               $$QMAKE_COPY $$OUT_PWD/../../imports/$$TARGETPATH/plugins.qmltypes $$[QT_INSTALL_QML]/$$TARGETPATH/plugins.qmltypes
    INSTALLS += copypluginqmltypes
}

copyqmlinfra_install.files = $$QML_INFRA_FILES
copyqmlinfra_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmlinfra_install

copyqmldesigner_install.files = $$QML_DESIGNER_FILES
copyqmldesigner_install.path = $$[QT_INSTALL_QML]/$$TARGETPATH
INSTALLS += copyqmldesigner_install

copyqmlpropertyeditor_install.files = $$QML_PROPERTY_EDITOR_FILES
copyqmlpropertyeditor_install.path = $$QTCREATOR_INSTALL_DIR/share/qtcreator/qmldesigner/propertyEditorQmlSources/$$TARGETPATH
INSTALLS += copyqmlpropertyeditor_install

target.path = $$[QT_INSTALL_QML]/$$TARGETPATH

INSTALLS += target

OTHER_FILES += $$QML_INFRA_FILES $$QML_DESIGNER_FILES $$QML_PROPERTY_EDITOR_FILES


install qdnslookup_p.h

install qdnslookup_p.h

# Header files
INSTALL_HEADERS += \
    base/qdnslookup.h \
    base/qdnslookup_p.h \
    base/QXmppArchiveIq.h \
    base/QXmppBindIq.h \
    base/QXmppBookmarkSet.h \
    base/QXmppByteStreamIq.h \
    base/QXmppCodec.h \
    base/QXmppConstants.h \
    base/QXmppDataForm.h \
    base/QXmppDiscoveryIq.h \
    base/QXmppElement.h \
    base/QXmppEntityTimeIq.h \
    base/QXmppGlobal.h \
    base/QXmppIbbIq.h \
    base/QXmppIq.h \
    base/QXmppJingleIq.h \
    base/QXmppLogger.h \
    base/QXmppMessage.h \
    base/QXmppMucIq.h \
    base/QXmppNonSASLAuth.h \
    base/QXmppPacket.h \
    base/QXmppPingIq.h \
    base/QXmppPresence.h \
    base/QXmppPubSubIq.h \
    base/QXmppRosterIq.h \
    base/QXmppRpcIq.h \
    base/QXmppRtpChannel.h \
    base/QXmppSaslAuth.h \
    base/QXmppSessionIq.h \
    base/QXmppSocks.h \
    base/QXmppStanza.h \
    base/QXmppStream.h \
    base/QXmppStreamFeatures.h \
    base/QXmppStreamInitiationIq.h \
    base/QXmppStun.h \
    base/QXmppUtils.h \
    base/QXmppVCardIq.h \
    base/QXmppVersionIq.h

# Source files
SOURCES += \
    base/QXmppArchiveIq.cpp \
    base/QXmppBindIq.cpp \
    base/QXmppBookmarkSet.cpp \
    base/QXmppByteStreamIq.cpp \
    base/QXmppCodec.cpp \
    base/QXmppConstants.cpp \
    base/QXmppDataForm.cpp \
    base/QXmppDiscoveryIq.cpp \
    base/QXmppElement.cpp \
    base/QXmppEntityTimeIq.cpp \
    base/QXmppGlobal.cpp \
    base/QXmppIbbIq.cpp \
    base/QXmppIq.cpp \
    base/QXmppJingleIq.cpp \
    base/QXmppLogger.cpp \
    base/QXmppMessage.cpp \
    base/QXmppMucIq.cpp \
    base/QXmppNonSASLAuth.cpp \
    base/QXmppPacket.cpp \
    base/QXmppPingIq.cpp \
    base/QXmppPresence.cpp \
    base/QXmppPubSubIq.cpp \
    base/QXmppRosterIq.cpp \
    base/QXmppRpcIq.cpp \
    base/QXmppRtpChannel.cpp \
    base/QXmppSaslAuth.cpp \
    base/QXmppSessionIq.cpp \
    base/QXmppSocks.cpp \
    base/QXmppStanza.cpp \
    base/QXmppStream.cpp \
    base/QXmppStreamFeatures.cpp \
    base/QXmppStreamInitiationIq.cpp \
    base/QXmppStun.cpp \
    base/QXmppUtils.cpp \
    base/QXmppVCardIq.cpp \
    base/QXmppVersionIq.cpp

# DNS
SOURCES += base/qdnslookup.cpp
android:SOURCES += base/qdnslookup_stub.cpp
else:symbian:SOURCES += base/qdnslookup_symbian.cpp
else:unix:SOURCES += base/qdnslookup_unix.cpp
else:win32:SOURCES += base/qdnslookup_win.cpp

# Header files
INSTALL_HEADERS += \
    base/qdnslookup.h \
    base/QXmppArchiveIq.h \
    base/QXmppBindIq.h \
    base/QXmppBookmarkSet.h \
    base/QXmppByteStreamIq.h \
    base/QXmppCodec.h \
    base/QXmppConstants.h \
    base/QXmppDataForm.h \
    base/QXmppDiscoveryIq.h \
    base/QXmppElement.h \
    base/QXmppEntityTimeIq.h \
    base/QXmppGlobal.h \
    base/QXmppIbbIq.h \
    base/QXmppIq.h \
    base/QXmppJingleIq.h \
    base/QXmppLogger.h \
    base/QXmppMessage.h \
    base/QXmppMucIq.h \
    base/QXmppNonSASLAuth.h \
    base/QXmppPacket.h \
    base/QXmppPingIq.h \
    base/QXmppPresence.h \
    base/QXmppPubSubIq.h \
    base/QXmppRosterIq.h \
    base/QXmppRpcIq.h \
    base/QXmppRtpChannel.h \
    base/QXmppSaslAuth.h \
    base/QXmppSessionIq.h \
    base/QXmppSocks.h \
    base/QXmppStanza.h \
    base/QXmppStream.h \
    base/QXmppStreamFeatures.h \
    base/QXmppStreamInitiationIq.h \
    base/QXmppStun.h \
    base/QXmppUtils.h \
    base/QXmppVCardIq.h \
    base/QXmppVersionIq.h

# Source files
SOURCES += \
    base/QXmppArchiveIq.cpp \
    base/QXmppBindIq.cpp \
    base/QXmppBookmarkSet.cpp \
    base/QXmppByteStreamIq.cpp \
    base/QXmppCodec.cpp \
    base/QXmppConstants.cpp \
    base/QXmppDataForm.cpp \
    base/QXmppDiscoveryIq.cpp \
    base/QXmppElement.cpp \
    base/QXmppEntityTimeIq.cpp \
    base/QXmppGlobal.cpp \
    base/QXmppIbbIq.cpp \
    base/QXmppIq.cpp \
    base/QXmppJingleIq.cpp \
    base/QXmppLogger.cpp \
    base/QXmppMessage.cpp \
    base/QXmppMucIq.cpp \
    base/QXmppNonSASLAuth.cpp \
    base/QXmppPacket.cpp \
    base/QXmppPingIq.cpp \
    base/QXmppPresence.cpp \
    base/QXmppPubSubIq.cpp \
    base/QXmppRosterIq.cpp \
    base/QXmppRpcIq.cpp \
    base/QXmppRtpChannel.cpp \
    base/QXmppSaslAuth.cpp \
    base/QXmppSessionIq.cpp \
    base/QXmppSocks.cpp \
    base/QXmppStanza.cpp \
    base/QXmppStream.cpp \
    base/QXmppStreamFeatures.cpp \
    base/QXmppStreamInitiationIq.cpp \
    base/QXmppStun.cpp \
    base/QXmppUtils.cpp \
    base/QXmppVCardIq.cpp \
    base/QXmppVersionIq.cpp

# DNS
HEADERS += base/qdnslookup_p.h
SOURCES += base/qdnslookup.cpp
android:SOURCES += base/qdnslookup_stub.cpp
else:symbian:SOURCES += base/qdnslookup_symbian.cpp
else:unix:SOURCES += base/qdnslookup_unix.cpp
else:win32:SOURCES += base/qdnslookup_win.cpp