mms-engine.pro 2.57 KB
Newer Older
Slava Monich's avatar
Slava Monich committed
1 2
TEMPLATE = app
CONFIG += link_pkgconfig
3 4
PKGCONFIG += gmime-2.6 gio-unix-2.0 gio-2.0 glib-2.0 libsoup-2.4 dconf
PKGCONFIG += libwspcodec libgofono libglibutil
5
QMAKE_CFLAGS += -Wno-unused-parameter
Slava Monich's avatar
Slava Monich committed
6

7 8 9 10 11 12 13
include(../mms-lib/mms-lib-config.pri)

ResizeImageMagick {
  CONFIG -= qt
  PKGCONFIG += ImageMagick
}

14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
ConnManNemo {
  PKGCONFIG += libgofonoext
  DEFINES += MMS_CONNMAN_NEMO
  MMS_CONNMAN = mms-connman-nemo
} else {
  MMS_CONNMAN = mms-connman-ofono
}

DBUS_INTERFACE_DIR = $$_PRO_FILE_PWD_
MMS_LIB_DIR = $$_PRO_FILE_PWD_/../mms-lib
MMS_HANDLER_DIR = $$_PRO_FILE_PWD_/../mms-handler-dbus
MMS_SETTINGS_DIR = $$_PRO_FILE_PWD_/../mms-settings-dconf
MMS_CONNMAN_DIR = $$_PRO_FILE_PWD_/../$$MMS_CONNMAN

INCLUDEPATH += $$MMS_LIB_DIR/include
INCLUDEPATH += $$MMS_HANDLER_DIR/include
INCLUDEPATH += $$MMS_SETTINGS_DIR/include
INCLUDEPATH += $$MMS_CONNMAN_DIR/include

Slava Monich's avatar
Slava Monich committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46
SOURCES += \
  main.c \
  mms_engine.c
HEADERS += \
  mms_engine.h
OTHER_FILES += \
  org.nemomobile.MmsEngine.push.conf \
  org.nemomobile.MmsEngine.dbus.conf \
  org.nemomobile.MmsEngine.service \
  org.nemomobile.MmsEngine.xml

CONFIG(debug, debug|release) {
    DEFINES += DEBUG
    DESTDIR = $$_PRO_FILE_PWD_/build/debug
47
    LIBS += $$MMS_CONNMAN_DIR/build/debug/lib$${MMS_CONNMAN}.a
Slava Monich's avatar
Slava Monich committed
48 49
    LIBS += $$MMS_HANDLER_DIR/build/debug/libmms-handler-dbus.a
    LIBS += $$MMS_LIB_DIR/build/debug/libmms-lib.a
50
    LIBS += $$MMS_SETTINGS_DIR/build/debug/libmms-settings-dconf.a
Slava Monich's avatar
Slava Monich committed
51 52
} else {
    DESTDIR = $$_PRO_FILE_PWD_/build/release
53
    LIBS += $$MMS_CONNMAN_DIR/build/release/lib$${MMS_CONNMAN}.a
Slava Monich's avatar
Slava Monich committed
54 55
    LIBS += $$MMS_HANDLER_DIR/build/release/libmms-handler-dbus.a
    LIBS += $$MMS_LIB_DIR/build/release/libmms-lib.a
56
    LIBS += $$MMS_SETTINGS_DIR/build/release/libmms-settings-dconf.a
Slava Monich's avatar
Slava Monich committed
57 58
}

59
LIBS += -lmagic -ljpeg
60

Slava Monich's avatar
Slava Monich committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
MMS_ENGINE_DBUS_XML = $$DBUS_INTERFACE_DIR/org.nemomobile.MmsEngine.xml
MMS_ENGINE_DBUS_H = org.nemomobile.MmsEngine.h
org_nemomobile_mmsengine_h.input = MMS_ENGINE_DBUS_XML
org_nemomobile_mmsengine_h.output = $$MMS_ENGINE_DBUS_H
org_nemomobile_mmsengine_h.commands = gdbus-codegen --generate-c-code \
  org.nemomobile.MmsEngine $$MMS_ENGINE_DBUS_XML
org_nemomobile_mmsengine_h.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += org_nemomobile_mmsengine_h

MMS_ENGINE_DBUS_C = org.nemomobile.MmsEngine.c
org_nemomobile_mmsengine_c.input = MMS_ENGINE_DBUS_XML
org_nemomobile_mmsengine_c.output = $$MMS_ENGINE_DBUS_C
org_nemomobile_mmsengine_c.commands = gdbus-codegen --generate-c-code \
  org.nemomobile.MmsEngine $$MMS_ENGINE_DBUS_XML
org_nemomobile_mmsengine_c.CONFIG = no_link
QMAKE_EXTRA_COMPILERS += org_nemomobile_mmsengine_c
GENERATED_SOURCES += $$MMS_ENGINE_DBUS_C