xref: /glogg/glogg.pro (revision ab07219fc4929e4a013a06e32d0da8420683d5cb)
19a361c77SNicolas Bonnefon# -------------------------------------------------
29a361c77SNicolas Bonnefon# glogg
39a361c77SNicolas Bonnefon# -------------------------------------------------
49a361c77SNicolas BonnefonTARGET = glogg
59a361c77SNicolas BonnefonTEMPLATE = app
69a361c77SNicolas Bonnefon
79a361c77SNicolas Bonnefonwin32:Debug:CONFIG += console
89a361c77SNicolas Bonnefon
99a361c77SNicolas Bonnefon# Input
109a361c77SNicolas BonnefonSOURCES += main.cpp \
119a361c77SNicolas Bonnefon    mainwindow.cpp \
129a361c77SNicolas Bonnefon    crawlerwidget.cpp \
139a361c77SNicolas Bonnefon    abstractlogdata.cpp \
149a361c77SNicolas Bonnefon    logdata.cpp \
159a361c77SNicolas Bonnefon    logfiltereddata.cpp \
169a361c77SNicolas Bonnefon    abstractlogview.cpp \
179a361c77SNicolas Bonnefon    logmainview.cpp \
189a361c77SNicolas Bonnefon    filteredview.cpp \
199a361c77SNicolas Bonnefon    optionsdialog.cpp \
209a361c77SNicolas Bonnefon    configuration.cpp \
219a361c77SNicolas Bonnefon    filtersdialog.cpp \
229a361c77SNicolas Bonnefon    filterset.cpp \
230ef7fbb1SNicolas Bonnefon    savedsearches.cpp \
2462819106SNicolas Bonnefon    infoline.cpp \
25f35c72b9SNicolas Bonnefon    logdataworkerthread.cpp \
26d0d26f4fSNicolas Bonnefon    logfiltereddataworkerthread.cpp \
27d0d26f4fSNicolas Bonnefon    filewatcher.cpp
289a361c77SNicolas Bonnefon
299a361c77SNicolas BonnefonHEADERS += version.h \
309a361c77SNicolas Bonnefon    mainwindow.h \
319a361c77SNicolas Bonnefon    crawlerwidget.h \
329a361c77SNicolas Bonnefon    logmainview.h \
339a361c77SNicolas Bonnefon    log.h \
349a361c77SNicolas Bonnefon    filteredview.h \
359a361c77SNicolas Bonnefon    abstractlogdata.h \
369a361c77SNicolas Bonnefon    logdata.h \
379a361c77SNicolas Bonnefon    logfiltereddata.h \
389a361c77SNicolas Bonnefon    abstractlogview.h \
399a361c77SNicolas Bonnefon    optionsdialog.h \
409a361c77SNicolas Bonnefon    configuration.h \
419a361c77SNicolas Bonnefon    filtersdialog.h \
429a361c77SNicolas Bonnefon    filterset.h \
430ef7fbb1SNicolas Bonnefon    savedsearches.h \
4462819106SNicolas Bonnefon    infoline.h \
45f35c72b9SNicolas Bonnefon    logdataworkerthread.h \
46d0d26f4fSNicolas Bonnefon    logfiltereddataworkerthread.h \
47d0d26f4fSNicolas Bonnefon    filewatcher.h
489a361c77SNicolas Bonnefon
493e90fb01SNicolas BonnefonisEmpty(USE_NATIVE_BOOST) {
503e90fb01SNicolas Bonnefon    message(Building using static Boost libraries included in the tarball)
513e90fb01SNicolas Bonnefon
523e90fb01SNicolas Bonnefon    SOURCES += boost/libs/program_options/src/*.cpp \
533e90fb01SNicolas Bonnefon        boost/libs/detail/*.cpp \
543e90fb01SNicolas Bonnefon        boost/libs/smart_ptr/src/*.cpp
553e90fb01SNicolas Bonnefon
563e90fb01SNicolas Bonnefon    INCLUDEPATH += ./boost
573e90fb01SNicolas Bonnefon}
583e90fb01SNicolas Bonnefonelse {
593e90fb01SNicolas Bonnefon    message(Building using native dynamic Boost libraries)
603e90fb01SNicolas Bonnefon    LIBS += -lboost_program_options -L$HOME/lib/
613e90fb01SNicolas Bonnefon}
623e90fb01SNicolas Bonnefon
639a361c77SNicolas BonnefongreaterThan(QT_VERSION, "4.4.0") {
649a361c77SNicolas Bonnefon    FORMS += filtersdialog.ui
659a361c77SNicolas Bonnefon}
669a361c77SNicolas Bonnefonelse {
679a361c77SNicolas Bonnefon    message(Using old FiltersDialog)
689a361c77SNicolas Bonnefon    FORMS += filtersdialog_old.ui
699a361c77SNicolas Bonnefon}
709a361c77SNicolas Bonnefon
7136b4ae36SNicolas Bonnefon# For Windows icon
7236b4ae36SNicolas BonnefonRC_FILE = glogg.rc
739a361c77SNicolas BonnefonRESOURCES = glogg.qrc
749a361c77SNicolas Bonnefon
75458a6a73SNicolas Bonnefon# Build HTML documentation (if 'markdown' is available)
76458a6a73SNicolas Bonnefonsystem(type markdown >/dev/null) {
77458a6a73SNicolas Bonnefon    MARKDOWN += doc/documentation.markdown
78458a6a73SNicolas Bonnefon}
79458a6a73SNicolas Bonnefonelse {
80458a6a73SNicolas Bonnefon    message("markdown not found, HTML doc will not be generated")
81458a6a73SNicolas Bonnefon}
82458a6a73SNicolas Bonnefon
83458a6a73SNicolas Bonnefondoc_processor.name = markdown
84458a6a73SNicolas Bonnefondoc_processor.input = MARKDOWN
85458a6a73SNicolas Bonnefondoc_processor.output = doc/${QMAKE_FILE_BASE}.html
86458a6a73SNicolas Bonnefondoc_processor.commands = markdown ${QMAKE_FILE_NAME} | \
87458a6a73SNicolas Bonnefon    sed -f finish.sed >${QMAKE_FILE_OUT}
88458a6a73SNicolas Bonnefon
89458a6a73SNicolas Bonnefondoc_processor.CONFIG += target_predeps
90458a6a73SNicolas Bonnefondoc_processor.variable_out = doc.files
91458a6a73SNicolas Bonnefon
92458a6a73SNicolas BonnefonQMAKE_EXTRA_COMPILERS += doc_processor
93458a6a73SNicolas Bonnefon
94b5a5d5faSNicolas Bonnefon# Install (for unix)
95fca14737SNicolas Bonnefonicon16.path  = $$PREFIX/share/icons/hicolor/16x16/apps
96fca14737SNicolas Bonnefonicon16.files = images/hicolor/16x16/glogg.png
97fca14737SNicolas Bonnefon
98fca14737SNicolas Bonnefonicon32.path  = $$PREFIX/share/icons/hicolor/32x32/apps
99fca14737SNicolas Bonnefonicon32.files = images/hicolor/32x32/glogg.png
100fca14737SNicolas Bonnefon
101fca14737SNicolas Bonnefondoc.path  = $$PREFIX/share/doc/glogg
102458a6a73SNicolas Bonnefondoc.files += README COPYING
103fca14737SNicolas Bonnefon
104fca14737SNicolas Bonnefondesktop.path = $$PREFIX/share/applications
105fca14737SNicolas Bonnefondesktop.path = glogg.desktop
106fca14737SNicolas Bonnefon
107b5a5d5faSNicolas Bonnefontarget.path = $$PREFIX/bin
108fca14737SNicolas BonnefonINSTALLS = target icon16 icon32 doc desktop
109b5a5d5faSNicolas Bonnefon
110b5a5d5faSNicolas Bonnefon# Build directories
1119a361c77SNicolas Bonnefondebug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
1129a361c77SNicolas Bonnefonrelease:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
1139a361c77SNicolas Bonnefondebug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
1149a361c77SNicolas Bonnefonrelease:MOC_DIR = $${OUT_PWD}/.moc/release-shared
1159a361c77SNicolas Bonnefon
1169a361c77SNicolas BonnefonRelease:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\"
1179a361c77SNicolas BonnefonDebug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\"
1189a361c77SNicolas Bonnefon
119b5a5d5faSNicolas Bonnefon# Official builds can be generated with `qmake VERSION="1.2.3"'
120*ab07219fSNicolas BonnefonisEmpty(VERSION):system(date >/dev/null) {
121afcc2cb7SNicolas Bonnefon    system([ -f .tarball-version ]) {
122afcc2cb7SNicolas Bonnefon        QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\"
123afcc2cb7SNicolas Bonnefon    }
124afcc2cb7SNicolas Bonnefon    else {
125b5a5d5faSNicolas Bonnefon        QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\"
126b5a5d5faSNicolas Bonnefon        QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\"
127b5a5d5faSNicolas Bonnefon        QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\"
128b5a5d5faSNicolas Bonnefon    }
129afcc2cb7SNicolas Bonnefon}
130b5a5d5faSNicolas Bonnefonelse {
131b5a5d5faSNicolas Bonnefon    QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\"
132b5a5d5faSNicolas Bonnefon}
133458a6a73SNicolas Bonnefon
134