xref: /glogg/glogg.pro (revision f35c72b940428d7e0481d59e7447a966a881ad36)
1# -------------------------------------------------
2# glogg
3# -------------------------------------------------
4TARGET = glogg
5TEMPLATE = app
6
7win32:Debug:CONFIG += console
8
9# Input
10SOURCES += main.cpp \
11    mainwindow.cpp \
12    crawlerwidget.cpp \
13    abstractlogdata.cpp \
14    logdata.cpp \
15    logfiltereddata.cpp \
16    abstractlogview.cpp \
17    logmainview.cpp \
18    filteredview.cpp \
19    optionsdialog.cpp \
20    configuration.cpp \
21    filtersdialog.cpp \
22    filterset.cpp \
23    savedsearches.cpp \
24    infoline.cpp \
25    logdataworkerthread.cpp \
26    logfiltereddataworkerthread.cpp
27
28HEADERS += version.h \
29    mainwindow.h \
30    crawlerwidget.h \
31    logmainview.h \
32    log.h \
33    filteredview.h \
34    abstractlogdata.h \
35    logdata.h \
36    logfiltereddata.h \
37    abstractlogview.h \
38    optionsdialog.h \
39    configuration.h \
40    filtersdialog.h \
41    filterset.h \
42    savedsearches.h \
43    infoline.h \
44    logdataworkerthread.h \
45    logfiltereddataworkerthread.h
46
47greaterThan(QT_VERSION, "4.4.0") {
48    FORMS += filtersdialog.ui
49}
50else {
51    message(Using old FiltersDialog)
52    FORMS += filtersdialog_old.ui
53}
54
55# For Windows icon
56RC_FILE = glogg.rc
57RESOURCES = glogg.qrc
58
59# Install (for unix)
60icon16.path  = $$PREFIX/share/icons/hicolor/16x16/apps
61icon16.files = images/hicolor/16x16/glogg.png
62
63icon32.path  = $$PREFIX/share/icons/hicolor/32x32/apps
64icon32.files = images/hicolor/32x32/glogg.png
65
66doc.path  = $$PREFIX/share/doc/glogg
67doc.files = README.textile COPYING
68
69desktop.path = $$PREFIX/share/applications
70desktop.path = glogg.desktop
71
72target.path = $$PREFIX/bin
73INSTALLS = target icon16 icon32 doc desktop
74
75# Build directories
76debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
77release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
78debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
79release:MOC_DIR = $${OUT_PWD}/.moc/release-shared
80
81Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\"
82Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\"
83
84# Official builds can be generated with `qmake VERSION="1.2.3"'
85isEmpty(VERSION) {
86    QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\"
87    QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\"
88    QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\"
89}
90else {
91    QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\"
92}
93