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 129a361c77SNicolas BonnefonSOURCES += main.cpp \ 139a361c77SNicolas Bonnefon mainwindow.cpp \ 149a361c77SNicolas Bonnefon crawlerwidget.cpp \ 159a361c77SNicolas Bonnefon abstractlogdata.cpp \ 169a361c77SNicolas Bonnefon logdata.cpp \ 179a361c77SNicolas Bonnefon logfiltereddata.cpp \ 189a361c77SNicolas Bonnefon abstractlogview.cpp \ 199a361c77SNicolas Bonnefon logmainview.cpp \ 209a361c77SNicolas Bonnefon filteredview.cpp \ 219a361c77SNicolas Bonnefon optionsdialog.cpp \ 221685bbd1SNicolas Bonnefon persistentinfo.cpp \ 239a361c77SNicolas Bonnefon configuration.cpp \ 249a361c77SNicolas Bonnefon filtersdialog.cpp \ 259a361c77SNicolas Bonnefon filterset.cpp \ 260ef7fbb1SNicolas Bonnefon savedsearches.cpp \ 2762819106SNicolas Bonnefon infoline.cpp \ 28f35c72b9SNicolas Bonnefon logdataworkerthread.cpp \ 29d0d26f4fSNicolas Bonnefon logfiltereddataworkerthread.cpp \ 300876bc40SNicolas Bonnefon filewatcher.cpp \ 31461e6185SNicolas Bonnefon selection.cpp \ 328fa6737cSNicolas Bonnefon quickfind.cpp \ 338fa6737cSNicolas Bonnefon quickfindpattern.cpp \ 34a0230d5fSNicolas Bonnefon quickfindwidget.cpp \ 354f52d4dcSNicolas Bonnefon sessioninfo.cpp \ 36a0560bddSNicolas Bonnefon recentfiles.cpp \ 376b8096bfSAlexei Colin menuactiontooltipbehavior.cpp \ 38658425f1SNicolas Bonnefon overview.cpp \ 399b5088ffSNicolas Bonnefon overviewwidget.cpp \ 40*6c05d989SNicolas Bonnefon marks.cpp \ 41*6c05d989SNicolas Bonnefon quickfindmux.cpp 429a361c77SNicolas Bonnefon 436e94dd7aSNicolas BonnefonHEADERS += \ 449a361c77SNicolas Bonnefon mainwindow.h \ 459a361c77SNicolas Bonnefon crawlerwidget.h \ 469a361c77SNicolas Bonnefon logmainview.h \ 479a361c77SNicolas Bonnefon log.h \ 489a361c77SNicolas Bonnefon filteredview.h \ 499a361c77SNicolas Bonnefon abstractlogdata.h \ 509a361c77SNicolas Bonnefon logdata.h \ 519a361c77SNicolas Bonnefon logfiltereddata.h \ 529a361c77SNicolas Bonnefon abstractlogview.h \ 539a361c77SNicolas Bonnefon optionsdialog.h \ 541685bbd1SNicolas Bonnefon persistentinfo.h \ 559a361c77SNicolas Bonnefon configuration.h \ 569a361c77SNicolas Bonnefon filtersdialog.h \ 579a361c77SNicolas Bonnefon filterset.h \ 580ef7fbb1SNicolas Bonnefon savedsearches.h \ 5962819106SNicolas Bonnefon infoline.h \ 60f35c72b9SNicolas Bonnefon logdataworkerthread.h \ 61d0d26f4fSNicolas Bonnefon logfiltereddataworkerthread.h \ 620876bc40SNicolas Bonnefon filewatcher.h \ 63461e6185SNicolas Bonnefon selection.h \ 648fa6737cSNicolas Bonnefon quickfind.h \ 658fa6737cSNicolas Bonnefon quickfindpattern.h \ 661685bbd1SNicolas Bonnefon quickfindwidget.h \ 67a0230d5fSNicolas Bonnefon sessioninfo.h \ 684f52d4dcSNicolas Bonnefon persistable.h \ 69a0560bddSNicolas Bonnefon recentfiles.h \ 706b8096bfSAlexei Colin menuactiontooltipbehavior.h \ 71658425f1SNicolas Bonnefon overview.h \ 729b5088ffSNicolas Bonnefon overviewwidget.h \ 73d6f9be6eSNicolas Bonnefon marks.h \ 74*6c05d989SNicolas Bonnefon qfnotifications.h \ 75*6c05d989SNicolas Bonnefon quickfindmux.h 769a361c77SNicolas Bonnefon 772f3d4448SNicolas BonnefonisEmpty(BOOST_PATH) { 782f3d4448SNicolas Bonnefon message(Building using system dynamic Boost libraries) 794b0730ffSNicolas Bonnefon LIBS += -lboost_program_options 803e90fb01SNicolas Bonnefon} 813e90fb01SNicolas Bonnefonelse { 822f3d4448SNicolas Bonnefon message(Building using static Boost libraries at $$BOOST_PATH) 832f3d4448SNicolas Bonnefon 842f3d4448SNicolas Bonnefon SOURCES += $$BOOST_PATH/libs/program_options/src/*.cpp \ 852f3d4448SNicolas Bonnefon $$BOOST_PATH/libs/smart_ptr/src/*.cpp 862f3d4448SNicolas Bonnefon 872f3d4448SNicolas Bonnefon INCLUDEPATH += $$BOOST_PATH 883e90fb01SNicolas Bonnefon} 893e90fb01SNicolas Bonnefon 9026e566eaSNicolas BonnefonFORMS += optionsdialog.ui 9126e566eaSNicolas Bonnefon 929a361c77SNicolas BonnefongreaterThan(QT_VERSION, "4.4.0") { 939a361c77SNicolas Bonnefon FORMS += filtersdialog.ui 949a361c77SNicolas Bonnefon} 959a361c77SNicolas Bonnefonelse { 969a361c77SNicolas Bonnefon message(Using old FiltersDialog) 979a361c77SNicolas Bonnefon FORMS += filtersdialog_old.ui 989a361c77SNicolas Bonnefon} 999a361c77SNicolas Bonnefon 10036b4ae36SNicolas Bonnefon# For Windows icon 10136b4ae36SNicolas BonnefonRC_FILE = glogg.rc 1029a361c77SNicolas BonnefonRESOURCES = glogg.qrc 1039a361c77SNicolas Bonnefon 104458a6a73SNicolas Bonnefon# Build HTML documentation (if 'markdown' is available) 105458a6a73SNicolas Bonnefonsystem(type markdown >/dev/null) { 106458a6a73SNicolas Bonnefon MARKDOWN += doc/documentation.markdown 107458a6a73SNicolas Bonnefon} 108458a6a73SNicolas Bonnefonelse { 109458a6a73SNicolas Bonnefon message("markdown not found, HTML doc will not be generated") 110458a6a73SNicolas Bonnefon} 111458a6a73SNicolas Bonnefon 112458a6a73SNicolas Bonnefondoc_processor.name = markdown 113458a6a73SNicolas Bonnefondoc_processor.input = MARKDOWN 114458a6a73SNicolas Bonnefondoc_processor.output = doc/${QMAKE_FILE_BASE}.html 115458a6a73SNicolas Bonnefondoc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 116458a6a73SNicolas Bonnefon sed -f finish.sed >${QMAKE_FILE_OUT} 117458a6a73SNicolas Bonnefon 118458a6a73SNicolas Bonnefondoc_processor.CONFIG += target_predeps 119458a6a73SNicolas Bonnefondoc_processor.variable_out = doc.files 120458a6a73SNicolas Bonnefon 121458a6a73SNicolas BonnefonQMAKE_EXTRA_COMPILERS += doc_processor 122458a6a73SNicolas Bonnefon 123b5a5d5faSNicolas Bonnefon# Install (for unix) 124fca14737SNicolas Bonnefonicon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 125fca14737SNicolas Bonnefonicon16.files = images/hicolor/16x16/glogg.png 126fca14737SNicolas Bonnefon 127fca14737SNicolas Bonnefonicon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 128fca14737SNicolas Bonnefonicon32.files = images/hicolor/32x32/glogg.png 129fca14737SNicolas Bonnefon 1304863be78SNicolas Bonnefonicon_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps 1314863be78SNicolas Bonnefonicon_svg.files = images/hicolor/scalable/glogg.svg 1324863be78SNicolas Bonnefon 133fca14737SNicolas Bonnefondoc.path = $$PREFIX/share/doc/glogg 134458a6a73SNicolas Bonnefondoc.files += README COPYING 135fca14737SNicolas Bonnefon 136fca14737SNicolas Bonnefondesktop.path = $$PREFIX/share/applications 13776bf9e67SNicolas Bonnefondesktop.files = glogg.desktop 138fca14737SNicolas Bonnefon 139b5a5d5faSNicolas Bonnefontarget.path = $$PREFIX/bin 1404863be78SNicolas BonnefonINSTALLS = target icon16 icon32 icon_svg doc desktop 141b5a5d5faSNicolas Bonnefon 142b5a5d5faSNicolas Bonnefon# Build directories 1439a361c77SNicolas Bonnefondebug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 1449a361c77SNicolas Bonnefonrelease:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 1459a361c77SNicolas Bonnefondebug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 1469a361c77SNicolas Bonnefonrelease:MOC_DIR = $${OUT_PWD}/.moc/release-shared 1479a361c77SNicolas Bonnefon 148f1ff9ae1SNicolas Bonnefon# Debug symbols in debug builds 149f1ff9ae1SNicolas Bonnefondebug:QMAKE_CXXFLAGS += -g 150f1ff9ae1SNicolas Bonnefon 151867c74e5SNicolas Bonnefon# Extra compiler arguments 152867c74e5SNicolas Bonnefon# QMAKE_CXXFLAGS += -Weffc++ 153867c74e5SNicolas Bonnefon 15464c49544SNicolas BonnefonGPROF { 15564c49544SNicolas Bonnefon QMAKE_CXXFLAGS += -pg 15664c49544SNicolas Bonnefon QMAKE_LFLAGS += -pg 15764c49544SNicolas Bonnefon} 15864c49544SNicolas Bonnefon 15959d49dccSNicolas BonnefonisEmpty(LOG_LEVEL) { 1609a361c77SNicolas Bonnefon Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 161658425f1SNicolas Bonnefon Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG4\" 16259d49dccSNicolas Bonnefon} 16359d49dccSNicolas Bonnefonelse { 16459d49dccSNicolas Bonnefon message("Using specified log level: $$LOG_LEVEL") 16559d49dccSNicolas Bonnefon DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 16659d49dccSNicolas Bonnefon} 1679a361c77SNicolas Bonnefon 168b5a5d5faSNicolas Bonnefon# Official builds can be generated with `qmake VERSION="1.2.3"' 169ab07219fSNicolas BonnefonisEmpty(VERSION):system(date >/dev/null) { 170afcc2cb7SNicolas Bonnefon system([ -f .tarball-version ]) { 171afcc2cb7SNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 172afcc2cb7SNicolas Bonnefon } 173afcc2cb7SNicolas Bonnefon else { 174b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 175b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 176b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 177b5a5d5faSNicolas Bonnefon } 178afcc2cb7SNicolas Bonnefon} 179b5a5d5faSNicolas Bonnefonelse { 18021a1b6dcSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 181b5a5d5faSNicolas Bonnefon} 182458a6a73SNicolas Bonnefon 183