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 \ 229a361c77SNicolas Bonnefon configuration.cpp \ 239a361c77SNicolas Bonnefon filtersdialog.cpp \ 249a361c77SNicolas Bonnefon filterset.cpp \ 250ef7fbb1SNicolas Bonnefon savedsearches.cpp \ 2662819106SNicolas Bonnefon infoline.cpp \ 27f35c72b9SNicolas Bonnefon logdataworkerthread.cpp \ 28d0d26f4fSNicolas Bonnefon logfiltereddataworkerthread.cpp \ 290876bc40SNicolas Bonnefon filewatcher.cpp \ 30461e6185SNicolas Bonnefon selection.cpp \ 318fa6737cSNicolas Bonnefon quickfind.cpp \ 328fa6737cSNicolas Bonnefon quickfindpattern.cpp \ 338fa6737cSNicolas Bonnefon quickfindwidget.cpp 349a361c77SNicolas Bonnefon 359a361c77SNicolas BonnefonHEADERS += version.h \ 369a361c77SNicolas Bonnefon mainwindow.h \ 379a361c77SNicolas Bonnefon crawlerwidget.h \ 389a361c77SNicolas Bonnefon logmainview.h \ 399a361c77SNicolas Bonnefon log.h \ 409a361c77SNicolas Bonnefon filteredview.h \ 419a361c77SNicolas Bonnefon abstractlogdata.h \ 429a361c77SNicolas Bonnefon logdata.h \ 439a361c77SNicolas Bonnefon logfiltereddata.h \ 449a361c77SNicolas Bonnefon abstractlogview.h \ 459a361c77SNicolas Bonnefon optionsdialog.h \ 469a361c77SNicolas Bonnefon configuration.h \ 479a361c77SNicolas Bonnefon filtersdialog.h \ 489a361c77SNicolas Bonnefon filterset.h \ 490ef7fbb1SNicolas Bonnefon savedsearches.h \ 5062819106SNicolas Bonnefon infoline.h \ 51f35c72b9SNicolas Bonnefon logdataworkerthread.h \ 52d0d26f4fSNicolas Bonnefon logfiltereddataworkerthread.h \ 530876bc40SNicolas Bonnefon filewatcher.h \ 54461e6185SNicolas Bonnefon selection.h \ 558fa6737cSNicolas Bonnefon quickfind.h \ 568fa6737cSNicolas Bonnefon quickfindpattern.h \ 578fa6737cSNicolas Bonnefon quickfindwidget.h 589a361c77SNicolas Bonnefon 593e90fb01SNicolas BonnefonisEmpty(USE_NATIVE_BOOST) { 603e90fb01SNicolas Bonnefon message(Building using static Boost libraries included in the tarball) 613e90fb01SNicolas Bonnefon 623e90fb01SNicolas Bonnefon SOURCES += boost/libs/program_options/src/*.cpp \ 633e90fb01SNicolas Bonnefon boost/libs/detail/*.cpp \ 643e90fb01SNicolas Bonnefon boost/libs/smart_ptr/src/*.cpp 653e90fb01SNicolas Bonnefon 663e90fb01SNicolas Bonnefon INCLUDEPATH += ./boost 673e90fb01SNicolas Bonnefon} 683e90fb01SNicolas Bonnefonelse { 693e90fb01SNicolas Bonnefon message(Building using native dynamic Boost libraries) 703e90fb01SNicolas Bonnefon LIBS += -lboost_program_options -L$HOME/lib/ 713e90fb01SNicolas Bonnefon} 723e90fb01SNicolas Bonnefon 739a361c77SNicolas BonnefongreaterThan(QT_VERSION, "4.4.0") { 749a361c77SNicolas Bonnefon FORMS += filtersdialog.ui 759a361c77SNicolas Bonnefon} 769a361c77SNicolas Bonnefonelse { 779a361c77SNicolas Bonnefon message(Using old FiltersDialog) 789a361c77SNicolas Bonnefon FORMS += filtersdialog_old.ui 799a361c77SNicolas Bonnefon} 809a361c77SNicolas Bonnefon 8136b4ae36SNicolas Bonnefon# For Windows icon 8236b4ae36SNicolas BonnefonRC_FILE = glogg.rc 839a361c77SNicolas BonnefonRESOURCES = glogg.qrc 849a361c77SNicolas Bonnefon 85458a6a73SNicolas Bonnefon# Build HTML documentation (if 'markdown' is available) 86458a6a73SNicolas Bonnefonsystem(type markdown >/dev/null) { 87458a6a73SNicolas Bonnefon MARKDOWN += doc/documentation.markdown 88458a6a73SNicolas Bonnefon} 89458a6a73SNicolas Bonnefonelse { 90458a6a73SNicolas Bonnefon message("markdown not found, HTML doc will not be generated") 91458a6a73SNicolas Bonnefon} 92458a6a73SNicolas Bonnefon 93458a6a73SNicolas Bonnefondoc_processor.name = markdown 94458a6a73SNicolas Bonnefondoc_processor.input = MARKDOWN 95458a6a73SNicolas Bonnefondoc_processor.output = doc/${QMAKE_FILE_BASE}.html 96458a6a73SNicolas Bonnefondoc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 97458a6a73SNicolas Bonnefon sed -f finish.sed >${QMAKE_FILE_OUT} 98458a6a73SNicolas Bonnefon 99458a6a73SNicolas Bonnefondoc_processor.CONFIG += target_predeps 100458a6a73SNicolas Bonnefondoc_processor.variable_out = doc.files 101458a6a73SNicolas Bonnefon 102458a6a73SNicolas BonnefonQMAKE_EXTRA_COMPILERS += doc_processor 103458a6a73SNicolas Bonnefon 104b5a5d5faSNicolas Bonnefon# Install (for unix) 105fca14737SNicolas Bonnefonicon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 106fca14737SNicolas Bonnefonicon16.files = images/hicolor/16x16/glogg.png 107fca14737SNicolas Bonnefon 108fca14737SNicolas Bonnefonicon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 109fca14737SNicolas Bonnefonicon32.files = images/hicolor/32x32/glogg.png 110fca14737SNicolas Bonnefon 111fca14737SNicolas Bonnefondoc.path = $$PREFIX/share/doc/glogg 112458a6a73SNicolas Bonnefondoc.files += README COPYING 113fca14737SNicolas Bonnefon 114fca14737SNicolas Bonnefondesktop.path = $$PREFIX/share/applications 11576bf9e67SNicolas Bonnefondesktop.files = glogg.desktop 116fca14737SNicolas Bonnefon 117b5a5d5faSNicolas Bonnefontarget.path = $$PREFIX/bin 118fca14737SNicolas BonnefonINSTALLS = target icon16 icon32 doc desktop 119b5a5d5faSNicolas Bonnefon 120b5a5d5faSNicolas Bonnefon# Build directories 1219a361c77SNicolas Bonnefondebug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 1229a361c77SNicolas Bonnefonrelease:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 1239a361c77SNicolas Bonnefondebug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 1249a361c77SNicolas Bonnefonrelease:MOC_DIR = $${OUT_PWD}/.moc/release-shared 1259a361c77SNicolas Bonnefon 126*f1ff9ae1SNicolas Bonnefon# Debug symbols in debug builds 127*f1ff9ae1SNicolas Bonnefondebug:QMAKE_CXXFLAGS += -g 128*f1ff9ae1SNicolas Bonnefon 12959d49dccSNicolas BonnefonisEmpty(LOG_LEVEL) { 1309a361c77SNicolas Bonnefon Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 1319a361c77SNicolas Bonnefon Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\" 13259d49dccSNicolas Bonnefon} 13359d49dccSNicolas Bonnefonelse { 13459d49dccSNicolas Bonnefon message("Using specified log level: $$LOG_LEVEL") 13559d49dccSNicolas Bonnefon DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 13659d49dccSNicolas Bonnefon} 1379a361c77SNicolas Bonnefon 138b5a5d5faSNicolas Bonnefon# Official builds can be generated with `qmake VERSION="1.2.3"' 139ab07219fSNicolas BonnefonisEmpty(VERSION):system(date >/dev/null) { 140afcc2cb7SNicolas Bonnefon system([ -f .tarball-version ]) { 141afcc2cb7SNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 142afcc2cb7SNicolas Bonnefon } 143afcc2cb7SNicolas Bonnefon else { 144b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 145b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 146b5a5d5faSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 147b5a5d5faSNicolas Bonnefon } 148afcc2cb7SNicolas Bonnefon} 149b5a5d5faSNicolas Bonnefonelse { 15021a1b6dcSNicolas Bonnefon QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 151b5a5d5faSNicolas Bonnefon} 152458a6a73SNicolas Bonnefon 153