1# ------------------------------------------------- 2# glogg 3# ------------------------------------------------- 4TARGET = glogg 5TEMPLATE = app 6 7win32:Debug:CONFIG += console 8 9# Input 10SOURCES += main.cpp \ 11 mainwindow.cpp \ 12 crawlerwidget.cpp \ 13 abstractlogdata.cpp \ 14 logdata.cpp \ 15 logfiltereddata.cpp \ 16 abstractlogview.cpp \ 17 logmainview.cpp \ 18 filteredview.cpp \ 19 optionsdialog.cpp \ 20 configuration.cpp \ 21 filtersdialog.cpp \ 22 filterset.cpp \ 23 savedsearches.cpp \ 24 infoline.cpp \ 25 logdataworkerthread.cpp \ 26 logfiltereddataworkerthread.cpp \ 27 filewatcher.cpp 28 29HEADERS += version.h \ 30 mainwindow.h \ 31 crawlerwidget.h \ 32 logmainview.h \ 33 log.h \ 34 filteredview.h \ 35 abstractlogdata.h \ 36 logdata.h \ 37 logfiltereddata.h \ 38 abstractlogview.h \ 39 optionsdialog.h \ 40 configuration.h \ 41 filtersdialog.h \ 42 filterset.h \ 43 savedsearches.h \ 44 infoline.h \ 45 logdataworkerthread.h \ 46 logfiltereddataworkerthread.h \ 47 filewatcher.h 48 49isEmpty(USE_NATIVE_BOOST) { 50 message(Building using static Boost libraries included in the tarball) 51 52 SOURCES += boost/libs/program_options/src/*.cpp \ 53 boost/libs/detail/*.cpp \ 54 boost/libs/smart_ptr/src/*.cpp 55 56 INCLUDEPATH += ./boost 57} 58else { 59 message(Building using native dynamic Boost libraries) 60 LIBS += -lboost_program_options -L$HOME/lib/ 61} 62 63greaterThan(QT_VERSION, "4.4.0") { 64 FORMS += filtersdialog.ui 65} 66else { 67 message(Using old FiltersDialog) 68 FORMS += filtersdialog_old.ui 69} 70 71# For Windows icon 72RC_FILE = glogg.rc 73RESOURCES = glogg.qrc 74 75# Build HTML documentation (if 'markdown' is available) 76system(type markdown >/dev/null) { 77 MARKDOWN += doc/documentation.markdown 78} 79else { 80 message("markdown not found, HTML doc will not be generated") 81} 82 83doc_processor.name = markdown 84doc_processor.input = MARKDOWN 85doc_processor.output = doc/${QMAKE_FILE_BASE}.html 86doc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 87 sed -f finish.sed >${QMAKE_FILE_OUT} 88 89doc_processor.CONFIG += target_predeps 90doc_processor.variable_out = doc.files 91 92QMAKE_EXTRA_COMPILERS += doc_processor 93 94# Install (for unix) 95icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 96icon16.files = images/hicolor/16x16/glogg.png 97 98icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 99icon32.files = images/hicolor/32x32/glogg.png 100 101doc.path = $$PREFIX/share/doc/glogg 102doc.files += README COPYING 103 104desktop.path = $$PREFIX/share/applications 105desktop.files = glogg.desktop 106 107target.path = $$PREFIX/bin 108INSTALLS = target icon16 icon32 doc desktop 109 110# Build directories 111debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 112release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 113debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 114release:MOC_DIR = $${OUT_PWD}/.moc/release-shared 115 116isEmpty(LOG_LEVEL) { 117 Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 118 Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG\" 119} 120else { 121 message("Using specified log level: $$LOG_LEVEL") 122 DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 123} 124 125# Official builds can be generated with `qmake VERSION="1.2.3"' 126isEmpty(VERSION):system(date >/dev/null) { 127 system([ -f .tarball-version ]) { 128 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 129 } 130 else { 131 QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 132 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 133 QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 134 } 135} 136else { 137 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$(VERSION)\\\" 138} 139 140