xref: /glogg/glogg.pro (revision fca14737515a945830daffc0aa083ae925c4d9a5)
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
25HEADERS += version.h \
26    mainwindow.h \
27    crawlerwidget.h \
28    logmainview.h \
29    log.h \
30    filteredview.h \
31    abstractlogdata.h \
32    logdata.h \
33    logfiltereddata.h \
34    abstractlogview.h \
35    optionsdialog.h \
36    configuration.h \
37    filtersdialog.h \
38    filterset.h \
39    savedsearches.h
40
41greaterThan(QT_VERSION, "4.4.0") {
42    FORMS += filtersdialog.ui
43}
44else {
45    message(Using old FiltersDialog)
46    FORMS += filtersdialog_old.ui
47}
48
49# For Windows icon
50RC_FILE = glogg.rc
51RESOURCES = glogg.qrc
52
53# Install (for unix)
54icon16.path  = $$PREFIX/share/icons/hicolor/16x16/apps
55icon16.files = images/hicolor/16x16/glogg.png
56
57icon32.path  = $$PREFIX/share/icons/hicolor/32x32/apps
58icon32.files = images/hicolor/32x32/glogg.png
59
60doc.path  = $$PREFIX/share/doc/glogg
61doc.files = README.textile COPYING
62
63desktop.path = $$PREFIX/share/applications
64desktop.path = glogg.desktop
65
66target.path = $$PREFIX/bin
67INSTALLS = target icon16 icon32 doc desktop
68
69# Build directories
70debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
71release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
72debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
73release:MOC_DIR = $${OUT_PWD}/.moc/release-shared
74
75Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\"
76Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\"
77
78# Official builds can be generated with `qmake VERSION="1.2.3"'
79isEmpty(VERSION) {
80    QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\"
81    QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\"
82    QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\"
83}
84else {
85    QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\"
86}
87