1# ------------------------------------------------- 2# glogg 3# ------------------------------------------------- 4TARGET = glogg 5TEMPLATE = app 6 7win32:Debug:CONFIG += console 8# Necessary when cross-compiling: 9win32:Release:QMAKE_LFLAGS += "-Wl,-subsystem,windows" 10 11# Input 12SOURCES += \ 13 src/main.cpp \ 14 src/data/abstractlogdata.cpp \ 15 src/data/logdata.cpp \ 16 src/data/logfiltereddata.cpp \ 17 src/data/logfiltereddataworkerthread.cpp \ 18 src/data/logdataworkerthread.cpp \ 19 src/mainwindow.cpp \ 20 src/crawlerwidget.cpp \ 21 src/abstractlogview.cpp \ 22 src/logmainview.cpp \ 23 src/filteredview.cpp \ 24 src/optionsdialog.cpp \ 25 src/persistentinfo.cpp \ 26 src/configuration.cpp \ 27 src/filtersdialog.cpp \ 28 src/filterset.cpp \ 29 src/savedsearches.cpp \ 30 src/infoline.cpp \ 31 src/menuactiontooltipbehavior.cpp \ 32 src/filewatcher.cpp \ 33 src/selection.cpp \ 34 src/quickfind.cpp \ 35 src/quickfindpattern.cpp \ 36 src/quickfindwidget.cpp \ 37 src/sessioninfo.cpp \ 38 src/recentfiles.cpp \ 39 src/overview.cpp \ 40 src/overviewwidget.cpp \ 41 src/marks.cpp \ 42 src/quickfindmux.cpp 43 44INCLUDEPATH += src/ 45 46HEADERS += \ 47 src/data/abstractlogdata.h \ 48 src/data/logdata.h \ 49 src/data/logfiltereddata.h \ 50 src/data/logfiltereddataworkerthread.h \ 51 src/data/logdataworkerthread.h \ 52 src/mainwindow.h \ 53 src/crawlerwidget.h \ 54 src/logmainview.h \ 55 src/log.h \ 56 src/filteredview.h \ 57 src/abstractlogview.h \ 58 src/optionsdialog.h \ 59 src/persistentinfo.h \ 60 src/configuration.h \ 61 src/filtersdialog.h \ 62 src/filterset.h \ 63 src/savedsearches.h \ 64 src/infoline.h \ 65 src/filewatcher.h \ 66 src/selection.h \ 67 src/quickfind.h \ 68 src/quickfindpattern.h \ 69 src/quickfindwidget.h \ 70 src/sessioninfo.h \ 71 src/persistable.h \ 72 src/recentfiles.h \ 73 src/menuactiontooltipbehavior.h \ 74 src/overview.h \ 75 src/overviewwidget.h \ 76 src/marks.h \ 77 src/qfnotifications.h \ 78 src/quickfindmux.h 79 80isEmpty(BOOST_PATH) { 81 message(Building using system dynamic Boost libraries) 82 LIBS += -lboost_program_options 83} 84else { 85 message(Building using static Boost libraries at $$BOOST_PATH) 86 87 SOURCES += $$BOOST_PATH/libs/program_options/src/*.cpp \ 88 $$BOOST_PATH/libs/smart_ptr/src/*.cpp 89 90 INCLUDEPATH += $$BOOST_PATH 91} 92 93FORMS += src/optionsdialog.ui 94FORMS += src/filtersdialog.ui 95 96# For Windows icon 97RC_FILE = glogg.rc 98RESOURCES = glogg.qrc 99 100# Build HTML documentation (if 'markdown' is available) 101system(type markdown >/dev/null) { 102 MARKDOWN += doc/documentation.markdown 103} 104else { 105 message("markdown not found, HTML doc will not be generated") 106} 107 108doc_processor.name = markdown 109doc_processor.input = MARKDOWN 110doc_processor.output = doc/${QMAKE_FILE_BASE}.html 111doc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 112 sed -f finish.sed >${QMAKE_FILE_OUT} 113 114doc_processor.CONFIG += target_predeps 115doc_processor.variable_out = doc.files 116 117QMAKE_EXTRA_COMPILERS += doc_processor 118 119# Install (for unix) 120icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 121icon16.files = images/hicolor/16x16/glogg.png 122 123icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 124icon32.files = images/hicolor/32x32/glogg.png 125 126icon_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps 127icon_svg.files = images/hicolor/scalable/glogg.svg 128 129doc.path = $$PREFIX/share/doc/glogg 130doc.files += README COPYING 131 132desktop.path = $$PREFIX/share/applications 133desktop.files = glogg.desktop 134 135target.path = $$PREFIX/bin 136INSTALLS = target icon16 icon32 icon_svg doc desktop 137 138# Build directories 139debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 140release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 141debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 142release:MOC_DIR = $${OUT_PWD}/.moc/release-shared 143debug:UI_DIR = $${OUT_PWD}/.ui/debug-shared 144release:UI_DIR = $${OUT_PWD}/.ui/release-shared 145 146# Debug symbols in debug builds 147debug:QMAKE_CXXFLAGS += -g 148 149# Extra compiler arguments 150# QMAKE_CXXFLAGS += -Weffc++ 151QMAKE_CXXFLAGS += -Wextra 152QMAKE_CXXFLAGS += -std=c++11 153 154GPROF { 155 QMAKE_CXXFLAGS += -pg 156 QMAKE_LFLAGS += -pg 157} 158 159isEmpty(LOG_LEVEL) { 160 Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 161 Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG4\" 162} 163else { 164 message("Using specified log level: $$LOG_LEVEL") 165 DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 166} 167 168# Official builds can be generated with `qmake VERSION="1.2.3"' 169isEmpty(VERSION):system(date >/dev/null) { 170 system([ -f .tarball-version ]) { 171 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 172 } 173 else { 174 QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 175 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 176 QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 177 } 178} 179else { 180 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 181} 182 183