File: engine.pro

package info (click to toggle)
qtcontacts-sqlite 0.3.20-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,952 kB
  • sloc: cpp: 32,880; ansic: 1,269; xml: 62; makefile: 32; sh: 18
file content (105 lines) | stat: -rw-r--r-- 3,076 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
include(../../config.pri)

TEMPLATE = lib
TARGET = qtcontacts_sqlite

QT = core sql dbus

# Error on undefined symbols
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF

CONFIG += plugin hide_symbols
PLUGIN_TYPE=contacts
DESTDIR=$${PLUGIN_TYPE}

packagesExist(mlite5) {
    PKGCONFIG += mlite5
    # The `DEFINES` directive is already set in `config.pri`
} else {
    warning("mlite not available. Display label groups will be generated from last name.")
}

# This should be passed on qmake command line
isEmpty(PKGCONFIG_LIB) {
    PKGCONFIG_LIB = lib
    message("PKGCONFIG_LIB is unset, assuming $$PKGCONFIG_LIB")
}

CONFIG(load_icu) {
    PKGCONFIG += sqlite3
    DEFINES += QTCONTACTS_SQLITE_LOAD_ICU

    # This should be passed on qmake command line (extension name or extension file name)
    isEmpty(SQLITE_ICU_EXT) {
        SQLITE_ICU_EXT = libSqliteIcu
        message("SQLITE_ICU_EXT is unset, assuming $$SQLITE_ICU_EXT")
    }

    # This should be passed on qmake command line (path to Sqlite3 extensions if not in a path
    # where sqlite3 can find them)
    isEmpty(SQLITE_EXTENSIONS) {
        message("SQLITE_EXTENSIONS is unset, trying to load sqlite3 extensions without full path")
        SQLITE_ICU_EXTENSION = $$SQLITE_ICU_EXT
    } else {
        SQLITE_ICU_EXTENSION = $$PREFIX/$$SQLITE_EXTENSIONS/$$SQLITE_ICU_EXT
    }
    DEFINES += 'SQLITE_ICU_EXTENSION=\'\"$$SQLITE_ICU_EXTENSION\"\''
}

# we hardcode this for Qt4 as there's no GenericDataLocation offered by QDesktopServices
DEFINES += 'QTCONTACTS_SQLITE_PRIVILEGED_DIR=\'\"privileged\"\''
DEFINES += 'QTCONTACTS_SQLITE_DATABASE_DIR=\'\"Contacts/qtcontacts-sqlite\"\''
DEFINES += 'QTCONTACTS_SQLITE_DATABASE_NAME=\'\"contacts.db\"\''
# we build a path like: /home/nemo/.local/share/system/Contacts/qtcontacts-sqlite/contacts.db

# Use the option to sort presence state by availability
DEFINES += SORT_PRESENCE_BY_AVAILABILITY

INCLUDEPATH += \
        ../extensions

HEADERS += \
        defaultdlggenerator.h \
        memorytable_p.h \
        semaphore_p.h \
        trace_p.h \
        conversion_p.h \
        contactid_p.h \
        contactsdatabase.h \
        contactsengine.h \
        contactstransientstore.h \
        contactnotifier.h \
        contactreader.h \
        contactwriter.h \
        ../extensions/contactmanagerengine.h

SOURCES += \
        defaultdlggenerator.cpp \
        memorytable.cpp \
        semaphore_p.cpp \
        conversion.cpp \
        contactid.cpp \
        contactsdatabase.cpp \
        contactsengine.cpp \
        contactstransientstore.cpp \
        contactsplugin.cpp \
        contactnotifier.cpp \
        contactreader.cpp \
        contactwriter.cpp

target.path = $$[QT_INSTALL_PLUGINS]/contacts
INSTALLS += target

PACKAGENAME=qtcontacts-sqlite-qt5-extensions

headers.path = $${PREFIX}/include/$${PACKAGENAME}
headers.files = ../extensions/*
headers.depends = ../extensions/*
INSTALLS += headers

pkgconfig.path = $${PREFIX}/$${PKGCONFIG_LIB}/pkgconfig
pkgconfig.files = ../$${PACKAGENAME}.pc
INSTALLS += pkgconfig

OTHER_FILES += plugin.json