MOBILITY_PREFIX=C:\QtMobility 
MOBILITY_INCLUDE=C:\QtMobility/include 
MOBILITY_LIB=C:\QtMobility/lib 

!symbian {
    INCLUDEPATH += $${MOBILITY_INCLUDE}
} else {
    load(data_caging_paths)
    contains(MOBILITY, contacts|versit) {
        INCLUDEPATH+=$${EPOCROOT}epoc32/include/app
    }

    contains(MOBILITY,bearer|location|publishsubscribe|systeminfo|multimedia|messaging|serviceframework) {
        INCLUDEPATH+=$${EPOCROOT}epoc32/include/mw
    }
}
mac: LIBS += -F$${MOBILITY_LIB}
LIBS+= -L$${MOBILITY_LIB}

contains(MOBILITY, bearer) {
    qtAddLibrary(QtBearer)
}

contains(MOBILITY, publishsubscribe) {
    qtAddLibrary(QtPublishSubscribe)
}

contains(MOBILITY, location) {
    qtAddLibrary(QtLocation)
}

contains(MOBILITY, serviceframework) {
    qtAddLibrary(QtServiceFramework)
}

contains(MOBILITY, systeminfo) {
    #QSystemInfo header requires QNetworkInterface
    QT += network
    qtAddLibrary(QtSystemInfo)
}

contains(MOBILITY, multimedia) {
    qtAddLibrary(QtMedia)
}

contains(MOBILITY, contacts) {
    qtAddLibrary(QtContacts)
}

contains(MOBILITY, messaging) {
    qtAddLibrary(QtMessaging)
}

contains(MOBILITY, versit) {
    qtAddLibrary(QtVersit)
}

# Add dependency to QtMobility package to all projects besides QtMobility package itself.
# Mobility libs have UID3 0x2002AC89
# self-sgned MObility libs have UID3 0xE002AC89
symbian:contains(CONFIG, mobility):!contains(TARGET.UID3, 0x2002AC89):!contains(TARGET.UID3, 0xE002AC89) {
    mobility_default_deployment.pkg_prerules += \
        "; Default dependency to QtMobility libraries" \
        "(0x2002AC89), 0, 2, 0, {\"QtMobility\"}"
    DEPLOYMENT += mobility_default_deployment
}
