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 \ 22*1685bbd1SNicolas 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 \ 348fa6737cSNicolas Bonnefon quickfindwidget.cpp 359a361c77SNicolas Bonnefon 369a361c77SNicolas BonnefonHEADERS += version.h \ 379a361c77SNicolas Bonnefon mainwindow.h \ 389a361c77SNicolas Bonnefon crawlerwidget.h \ 399a361c77SNicolas Bonnefon logmainview.h \ 409a361c77SNicolas Bonnefon log.h \ 419a361c77SNicolas Bonnefon filteredview.h \ 429a361c77SNicolas Bonnefon abstractlogdata.h \ 439a361c77SNicolas Bonnefon logdata.h \ 449a361c77SNicolas Bonnefon logfiltereddata.h \ 459a361c77SNicolas Bonnefon abstractlogview.h \ 469a361c77SNicolas Bonnefon optionsdialog.h \ 47*1685bbd1SNicolas Bonnefon persistentinfo.h \ 489a361c77SNicolas Bonnefon configuration.h \ 499a361c77SNicolas Bonnefon filtersdialog.h \ 509a361c77SNicolas Bonnefon filterset.h \ 510ef7fbb1SNicolas Bonnefon savedsearches.h \ 5262819106SNicolas Bonnefon infoline.h \ 53f35c72b9SNicolas Bonnefon logdataworkerthread.h \ 54d0d26f4fSNicolas Bonnefon logfiltereddataworkerthread.h \ 550876bc40SNicolas Bonnefon filewatcher.h \ 56461e6185SNicolas Bonnefon selection.h \ 578fa6737cSNicolas Bonnefon quickfind.h \ 588fa6737cSNicolas Bonnefon quickfindpattern.h \ 59*1685bbd1SNicolas Bonnefon quickfindwidget.h \ 60*1685bbd1SNicolas Bonnefon persistable.h 619a361c77SNicolas Bonnefon 622f3d4448SNicolas BonnefonisEmpty(BOOST_PATH) { 632f3d4448SNicolas Bonnefon message(Building using system dynamic Boost libraries) 642f3d4448SNicolas Bonnefon LIBS += -lboost_program_options -L$HOME/lib/ 653e90fb01SNicolas Bonnefon} 663e90fb01SNicolas Bonnefonelse { 672f3d4448SNicolas Bonnefon message(Building using static Boost libraries at $$BOOST_PATH) 682f3d4448SNicolas Bonnefon 692f3d4448SNicolas Bonnefon SOURCES += $$BOOST_PATH/libs/program_options/src/*.cpp \ 702f3d4448SNicolas Bonnefon $$BOOST_PATH/libs/detail/*.cpp \ 712f3d4448SNicolas Bonnefon $$BOOST_PATH/libs/smart_ptr/src/*.cpp 722f3d4448SNicolas Bonnefon 732f3d4448SNicolas Bonnefon INCLUDEPATH += $$BOOST_PATH 743e90fb01SNicolas Bonnefon} 753e90fb01SNicolas Bonnefon 7626e566eaSNicolas BonnefonFORMS += optionsdialog.ui 7726e566eaSNicolas Bonnefon 789a361c77SNicolas BonnefongreaterThan(QT_VERSION, "4.4.0") { 799a361c77SNicolas Bonnefon FORMS += filtersdialog.ui 809a361c77SNicolas Bonnefon} 819a361c77SNicolas Bonnefonelse { 829a361c77SNicolas Bonnefon message(Using old FiltersDialog) 839a361c77SNicolas Bonnefon FORMS += filtersdialog_old.ui 849a361c77SNicolas Bonnefon} 859a361c77SNicolas Bonnefon 8636b4ae36SNicolas Bonnefon# For Windows icon 8736b4ae36SNicolas BonnefonRC_FILE = glogg.rc 889a361c77SNicolas BonnefonRESOURCES = glogg.qrc 899a361c77SNicolas Bonnefon 90458a6a73SNicolas Bonnefon# Build HTML documentation (if 'markdown' is available) 91458a6a73SNicolas Bonnefonsystem(type markdown >/dev/null) { 92458a6a73SNicolas Bonnefon MARKDOWN += doc/documentation.markdown 93458a6a73SNicolas Bonnefon} 94458a6a73SNicolas Bonnefonelse { 95458a6a73SNicolas Bonnefon message("markdown not found, HTML doc will not be generated") 96458a6a73SNicolas Bonnefon} 97458a6a73SNicolas Bonnefon 98458a6a73SNicolas Bonnefondoc_processor.name = markdown 99458a6a73SNicolas Bonnefondoc_processor.input = MARKDOWN 100458a6a73SNicolas Bonnefondoc_processor.output = doc/${QMAKE_FILE_BASE}.html 101458a6a73SNicolas Bonnefondoc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 102458a6a73SNicolas Bonnefon sed -f finish.sed >${QMAKE_FILE_OUT} 103458a6a73SNicolas Bonnefon 104458a6a73SNicolas Bonnefondoc_processor.CONFIG += target_predeps 105458a6a73SNicolas Bonnefondoc_processor.variable_out = doc.files 106458a6a73SNicolas Bonnefon 107458a6a73SNicolas BonnefonQMAKE_EXTRA_COMPILERS += doc_processor 108458a6a73SNicolas Bonnefon 109b5a5d5faSNicolas Bonnefon# Install (for unix) 110fca14737SNicolas Bonnefonicon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 111fca14737SNicolas Bonnefonicon16.files = images/hicolor/16x16/glogg.png 112fca14737SNicolas Bonnefon 113fca14737SNicolas Bonnefonicon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 114fca14737SNicolas Bonnefonicon32.files = images/hicolor/32x32/glogg.png 115fca14737SNicolas Bonnefon 116fca14737SNicolas Bonnefondoc.path = $$PREFIX/share/doc/glogg 117458a6a73SNicolas Bonnefondoc.files += README COPYING 118fca14737SNicolas Bonnefon 119fca14737SNicolas Bonnefondesktop.path = $$PREFIX/share/applications 12076bf9e67SNicolas Bonnefondesktop.files = glogg.desktop 121fca14737SNicolas Bonnefon 122b5a5d5faSNicolas Bonnefontarget.path = $$PREFIX/bin 123fca14737SNicolas BonnefonINSTALLS = target icon16 icon32 doc desktop 124b5a5d5faSNicolas Bonnefon 125b5a5d5faSNicolas Bonnefon# Build directories 1269a361c77SNicolas Bonnefondebug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 1279a361c77SNicolas Bonnefonrelease:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 1289a361c77SNicolas Bonnefondebug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 1299a361c77SNicolas Bonnefonrelease:MOC_DIR = $${OUT_PWD}/.moc/release-shared 1309a361c77SNicolas Bonnefon 131f1ff9ae1SNicolas Bonnefon# Debug symbols in debug builds 132f1ff9ae1SNicolas Bonnefondebug:QMAKE_CXXFLAGS += -g 133f1ff9ae1SNicolas Bonnefon 13459d49dccSNicolas BonnefonisEmpty(LOG_LEVEL) { 1359a361c77SNicolas Bonnefon Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 1369a361c77SNicolas Bonnefon Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\" 13759d49dccSNicolas Bonnefon} 13859d49dccSNicolas Bonnefonelse { 13959d49dccSNicolas Bonnefon message("Using specified log level: $$LOG_LEVEL") 14059d49dccSNicolas Bonnefon DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 14159d49dccSNicolas Bonnefon} 1429a361c77SNicolas Bonnefon 143b5a5d5faSNicolas Bonnefon# Official builds can be generated with `qmake VERSION="1.2.3"' 144ab07219fSNicolas BonnefonisEmpty(VERSION):system(date >/dev/null) { 145afcc2cb7SNicolas Bonnefon system([ -f .tarball-version ]) { 146afcc2cb7SNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 147afcc2cb7SNicolas Bonnefon } 148afcc2cb7SNicolas Bonnefon else { 149b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 150b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 151b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 152b5a5d5faSNicolas Bonnefon } 153afcc2cb7SNicolas Bonnefon} 154b5a5d5faSNicolas Bonnefonelse { 15521a1b6dcSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 156b5a5d5faSNicolas Bonnefon} 157458a6a73SNicolas Bonnefon 158