19a361c77SNicolas Bonnefon# ------------------------------------------------- 29a361c77SNicolas Bonnefon# glogg 39a361c77SNicolas Bonnefon# ------------------------------------------------- 49a361c77SNicolas BonnefonTARGET = glogg 59a361c77SNicolas BonnefonTEMPLATE = app 69a361c77SNicolas Bonnefon 79a361c77SNicolas Bonnefonwin32:Debug:CONFIG += console 83597d419SNicolas Bonnefon# Necessary when cross-compiling: 93597d419SNicolas Bonnefonwin32:Release:QMAKE_LFLAGS += "-Wl,-subsystem,windows" 109a361c77SNicolas Bonnefon 119a361c77SNicolas Bonnefon# Input 12*bb02e0acSNicolas BonnefonSOURCES += \ 13*bb02e0acSNicolas Bonnefon src/main.cpp \ 14*bb02e0acSNicolas Bonnefon src/data/abstractlogdata.cpp \ 15*bb02e0acSNicolas Bonnefon src/data/logdata.cpp \ 16*bb02e0acSNicolas Bonnefon src/data/logfiltereddata.cpp \ 17*bb02e0acSNicolas Bonnefon src/data/logfiltereddataworkerthread.cpp \ 18*bb02e0acSNicolas Bonnefon src/data/logdataworkerthread.cpp \ 19*bb02e0acSNicolas Bonnefon src/mainwindow.cpp \ 20*bb02e0acSNicolas Bonnefon src/crawlerwidget.cpp \ 21*bb02e0acSNicolas Bonnefon src/abstractlogview.cpp \ 22*bb02e0acSNicolas Bonnefon src/logmainview.cpp \ 23*bb02e0acSNicolas Bonnefon src/filteredview.cpp \ 24*bb02e0acSNicolas Bonnefon src/optionsdialog.cpp \ 25*bb02e0acSNicolas Bonnefon src/persistentinfo.cpp \ 26*bb02e0acSNicolas Bonnefon src/configuration.cpp \ 27*bb02e0acSNicolas Bonnefon src/filtersdialog.cpp \ 28*bb02e0acSNicolas Bonnefon src/filterset.cpp \ 29*bb02e0acSNicolas Bonnefon src/savedsearches.cpp \ 30*bb02e0acSNicolas Bonnefon src/infoline.cpp \ 31*bb02e0acSNicolas Bonnefon src/menuactiontooltipbehavior.cpp \ 32*bb02e0acSNicolas Bonnefon src/filewatcher.cpp \ 33*bb02e0acSNicolas Bonnefon src/selection.cpp \ 34*bb02e0acSNicolas Bonnefon src/quickfind.cpp \ 35*bb02e0acSNicolas Bonnefon src/quickfindpattern.cpp \ 36*bb02e0acSNicolas Bonnefon src/quickfindwidget.cpp \ 37*bb02e0acSNicolas Bonnefon src/sessioninfo.cpp \ 38*bb02e0acSNicolas Bonnefon src/recentfiles.cpp \ 39*bb02e0acSNicolas Bonnefon src/overview.cpp \ 40*bb02e0acSNicolas Bonnefon src/overviewwidget.cpp \ 41*bb02e0acSNicolas Bonnefon src/marks.cpp \ 42*bb02e0acSNicolas Bonnefon src/quickfindmux.cpp 43*bb02e0acSNicolas Bonnefon 44*bb02e0acSNicolas BonnefonINCLUDEPATH += src/ 459a361c77SNicolas Bonnefon 466e94dd7aSNicolas BonnefonHEADERS += \ 47*bb02e0acSNicolas Bonnefon src/data/abstractlogdata.h \ 48*bb02e0acSNicolas Bonnefon src/data/logdata.h \ 49*bb02e0acSNicolas Bonnefon src/data/logfiltereddata.h \ 50*bb02e0acSNicolas Bonnefon src/data/logfiltereddataworkerthread.h \ 51*bb02e0acSNicolas Bonnefon src/data/logdataworkerthread.h \ 52*bb02e0acSNicolas Bonnefon src/mainwindow.h \ 53*bb02e0acSNicolas Bonnefon src/crawlerwidget.h \ 54*bb02e0acSNicolas Bonnefon src/logmainview.h \ 55*bb02e0acSNicolas Bonnefon src/log.h \ 56*bb02e0acSNicolas Bonnefon src/filteredview.h \ 57*bb02e0acSNicolas Bonnefon src/abstractlogview.h \ 58*bb02e0acSNicolas Bonnefon src/optionsdialog.h \ 59*bb02e0acSNicolas Bonnefon src/persistentinfo.h \ 60*bb02e0acSNicolas Bonnefon src/configuration.h \ 61*bb02e0acSNicolas Bonnefon src/filtersdialog.h \ 62*bb02e0acSNicolas Bonnefon src/filterset.h \ 63*bb02e0acSNicolas Bonnefon src/savedsearches.h \ 64*bb02e0acSNicolas Bonnefon src/infoline.h \ 65*bb02e0acSNicolas Bonnefon src/filewatcher.h \ 66*bb02e0acSNicolas Bonnefon src/selection.h \ 67*bb02e0acSNicolas Bonnefon src/quickfind.h \ 68*bb02e0acSNicolas Bonnefon src/quickfindpattern.h \ 69*bb02e0acSNicolas Bonnefon src/quickfindwidget.h \ 70*bb02e0acSNicolas Bonnefon src/sessioninfo.h \ 71*bb02e0acSNicolas Bonnefon src/persistable.h \ 72*bb02e0acSNicolas Bonnefon src/recentfiles.h \ 73*bb02e0acSNicolas Bonnefon src/menuactiontooltipbehavior.h \ 74*bb02e0acSNicolas Bonnefon src/overview.h \ 75*bb02e0acSNicolas Bonnefon src/overviewwidget.h \ 76*bb02e0acSNicolas Bonnefon src/marks.h \ 77*bb02e0acSNicolas Bonnefon src/qfnotifications.h \ 78*bb02e0acSNicolas Bonnefon src/quickfindmux.h 799a361c77SNicolas Bonnefon 802f3d4448SNicolas BonnefonisEmpty(BOOST_PATH) { 812f3d4448SNicolas Bonnefon message(Building using system dynamic Boost libraries) 824b0730ffSNicolas Bonnefon LIBS += -lboost_program_options 833e90fb01SNicolas Bonnefon} 843e90fb01SNicolas Bonnefonelse { 852f3d4448SNicolas Bonnefon message(Building using static Boost libraries at $$BOOST_PATH) 862f3d4448SNicolas Bonnefon 872f3d4448SNicolas Bonnefon SOURCES += $$BOOST_PATH/libs/program_options/src/*.cpp \ 882f3d4448SNicolas Bonnefon $$BOOST_PATH/libs/smart_ptr/src/*.cpp 892f3d4448SNicolas Bonnefon 902f3d4448SNicolas Bonnefon INCLUDEPATH += $$BOOST_PATH 913e90fb01SNicolas Bonnefon} 923e90fb01SNicolas Bonnefon 93*bb02e0acSNicolas BonnefonFORMS += src/optionsdialog.ui 9426e566eaSNicolas Bonnefon 959a361c77SNicolas BonnefongreaterThan(QT_VERSION, "4.4.0") { 96*bb02e0acSNicolas Bonnefon FORMS += src/filtersdialog.ui 979a361c77SNicolas Bonnefon} 989a361c77SNicolas Bonnefonelse { 999a361c77SNicolas Bonnefon message(Using old FiltersDialog) 100*bb02e0acSNicolas Bonnefon FORMS += src/filtersdialog_old.ui 1019a361c77SNicolas Bonnefon} 1029a361c77SNicolas Bonnefon 10336b4ae36SNicolas Bonnefon# For Windows icon 10436b4ae36SNicolas BonnefonRC_FILE = glogg.rc 1059a361c77SNicolas BonnefonRESOURCES = glogg.qrc 1069a361c77SNicolas Bonnefon 107458a6a73SNicolas Bonnefon# Build HTML documentation (if 'markdown' is available) 108458a6a73SNicolas Bonnefonsystem(type markdown >/dev/null) { 109458a6a73SNicolas Bonnefon MARKDOWN += doc/documentation.markdown 110458a6a73SNicolas Bonnefon} 111458a6a73SNicolas Bonnefonelse { 112458a6a73SNicolas Bonnefon message("markdown not found, HTML doc will not be generated") 113458a6a73SNicolas Bonnefon} 114458a6a73SNicolas Bonnefon 115458a6a73SNicolas Bonnefondoc_processor.name = markdown 116458a6a73SNicolas Bonnefondoc_processor.input = MARKDOWN 117458a6a73SNicolas Bonnefondoc_processor.output = doc/${QMAKE_FILE_BASE}.html 118458a6a73SNicolas Bonnefondoc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 119458a6a73SNicolas Bonnefon sed -f finish.sed >${QMAKE_FILE_OUT} 120458a6a73SNicolas Bonnefon 121458a6a73SNicolas Bonnefondoc_processor.CONFIG += target_predeps 122458a6a73SNicolas Bonnefondoc_processor.variable_out = doc.files 123458a6a73SNicolas Bonnefon 124458a6a73SNicolas BonnefonQMAKE_EXTRA_COMPILERS += doc_processor 125458a6a73SNicolas Bonnefon 126b5a5d5faSNicolas Bonnefon# Install (for unix) 127fca14737SNicolas Bonnefonicon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 128fca14737SNicolas Bonnefonicon16.files = images/hicolor/16x16/glogg.png 129fca14737SNicolas Bonnefon 130fca14737SNicolas Bonnefonicon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 131fca14737SNicolas Bonnefonicon32.files = images/hicolor/32x32/glogg.png 132fca14737SNicolas Bonnefon 1334863be78SNicolas Bonnefonicon_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps 1344863be78SNicolas Bonnefonicon_svg.files = images/hicolor/scalable/glogg.svg 1354863be78SNicolas Bonnefon 136fca14737SNicolas Bonnefondoc.path = $$PREFIX/share/doc/glogg 137458a6a73SNicolas Bonnefondoc.files += README COPYING 138fca14737SNicolas Bonnefon 139fca14737SNicolas Bonnefondesktop.path = $$PREFIX/share/applications 14076bf9e67SNicolas Bonnefondesktop.files = glogg.desktop 141fca14737SNicolas Bonnefon 142b5a5d5faSNicolas Bonnefontarget.path = $$PREFIX/bin 1434863be78SNicolas BonnefonINSTALLS = target icon16 icon32 icon_svg doc desktop 144b5a5d5faSNicolas Bonnefon 145b5a5d5faSNicolas Bonnefon# Build directories 1469a361c77SNicolas Bonnefondebug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 1479a361c77SNicolas Bonnefonrelease:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 1489a361c77SNicolas Bonnefondebug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 1499a361c77SNicolas Bonnefonrelease:MOC_DIR = $${OUT_PWD}/.moc/release-shared 1509a361c77SNicolas Bonnefon 151f1ff9ae1SNicolas Bonnefon# Debug symbols in debug builds 152f1ff9ae1SNicolas Bonnefondebug:QMAKE_CXXFLAGS += -g 153f1ff9ae1SNicolas Bonnefon 154867c74e5SNicolas Bonnefon# Extra compiler arguments 155867c74e5SNicolas Bonnefon# QMAKE_CXXFLAGS += -Weffc++ 156e2f31691SNicolas BonnefonQMAKE_CXXFLAGS += -Wextra 157867c74e5SNicolas Bonnefon 15864c49544SNicolas BonnefonGPROF { 15964c49544SNicolas Bonnefon QMAKE_CXXFLAGS += -pg 16064c49544SNicolas Bonnefon QMAKE_LFLAGS += -pg 16164c49544SNicolas Bonnefon} 16264c49544SNicolas Bonnefon 16359d49dccSNicolas BonnefonisEmpty(LOG_LEVEL) { 1649a361c77SNicolas Bonnefon Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 165658425f1SNicolas Bonnefon Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG4\" 16659d49dccSNicolas Bonnefon} 16759d49dccSNicolas Bonnefonelse { 16859d49dccSNicolas Bonnefon message("Using specified log level: $$LOG_LEVEL") 16959d49dccSNicolas Bonnefon DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 17059d49dccSNicolas Bonnefon} 1719a361c77SNicolas Bonnefon 172b5a5d5faSNicolas Bonnefon# Official builds can be generated with `qmake VERSION="1.2.3"' 173ab07219fSNicolas BonnefonisEmpty(VERSION):system(date >/dev/null) { 174afcc2cb7SNicolas Bonnefon system([ -f .tarball-version ]) { 175afcc2cb7SNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 176afcc2cb7SNicolas Bonnefon } 177afcc2cb7SNicolas Bonnefon else { 178b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 179b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 180b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 181b5a5d5faSNicolas Bonnefon } 182afcc2cb7SNicolas Bonnefon} 183b5a5d5faSNicolas Bonnefonelse { 18421a1b6dcSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 185b5a5d5faSNicolas Bonnefon} 186458a6a73SNicolas Bonnefon 187