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 += main.cpp \ 13 mainwindow.cpp \ 14 crawlerwidget.cpp \ 15 abstractlogdata.cpp \ 16 logdata.cpp \ 17 logfiltereddata.cpp \ 18 abstractlogview.cpp \ 19 logmainview.cpp \ 20 filteredview.cpp \ 21 optionsdialog.cpp \ 22 persistentinfo.cpp \ 23 configuration.cpp \ 24 filtersdialog.cpp \ 25 filterset.cpp \ 26 savedsearches.cpp \ 27 infoline.cpp \ 28 logdataworkerthread.cpp \ 29 logfiltereddataworkerthread.cpp \ 30 filewatcher.cpp \ 31 selection.cpp \ 32 quickfind.cpp \ 33 quickfindpattern.cpp \ 34 quickfindwidget.cpp \ 35 sessioninfo.cpp \ 36 recentfiles.cpp \ 37 menuactiontooltipbehavior.cpp \ 38 overview.cpp \ 39 overviewwidget.cpp \ 40 marks.cpp \ 41 quickfindmux.cpp 42 43HEADERS += \ 44 mainwindow.h \ 45 crawlerwidget.h \ 46 logmainview.h \ 47 log.h \ 48 filteredview.h \ 49 abstractlogdata.h \ 50 logdata.h \ 51 logfiltereddata.h \ 52 abstractlogview.h \ 53 optionsdialog.h \ 54 persistentinfo.h \ 55 configuration.h \ 56 filtersdialog.h \ 57 filterset.h \ 58 savedsearches.h \ 59 infoline.h \ 60 logdataworkerthread.h \ 61 logfiltereddataworkerthread.h \ 62 filewatcher.h \ 63 selection.h \ 64 quickfind.h \ 65 quickfindpattern.h \ 66 quickfindwidget.h \ 67 sessioninfo.h \ 68 persistable.h \ 69 recentfiles.h \ 70 menuactiontooltipbehavior.h \ 71 overview.h \ 72 overviewwidget.h \ 73 marks.h \ 74 qfnotifications.h \ 75 quickfindmux.h 76 77isEmpty(BOOST_PATH) { 78 message(Building using system dynamic Boost libraries) 79 LIBS += -lboost_program_options 80} 81else { 82 message(Building using static Boost libraries at $$BOOST_PATH) 83 84 SOURCES += $$BOOST_PATH/libs/program_options/src/*.cpp \ 85 $$BOOST_PATH/libs/smart_ptr/src/*.cpp 86 87 INCLUDEPATH += $$BOOST_PATH 88} 89 90FORMS += optionsdialog.ui 91 92greaterThan(QT_VERSION, "4.4.0") { 93 FORMS += filtersdialog.ui 94} 95else { 96 message(Using old FiltersDialog) 97 FORMS += filtersdialog_old.ui 98} 99 100# For Windows icon 101RC_FILE = glogg.rc 102RESOURCES = glogg.qrc 103 104# Build HTML documentation (if 'markdown' is available) 105system(type markdown >/dev/null) { 106 MARKDOWN += doc/documentation.markdown 107} 108else { 109 message("markdown not found, HTML doc will not be generated") 110} 111 112doc_processor.name = markdown 113doc_processor.input = MARKDOWN 114doc_processor.output = doc/${QMAKE_FILE_BASE}.html 115doc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 116 sed -f finish.sed >${QMAKE_FILE_OUT} 117 118doc_processor.CONFIG += target_predeps 119doc_processor.variable_out = doc.files 120 121QMAKE_EXTRA_COMPILERS += doc_processor 122 123# Install (for unix) 124icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 125icon16.files = images/hicolor/16x16/glogg.png 126 127icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 128icon32.files = images/hicolor/32x32/glogg.png 129 130icon_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps 131icon_svg.files = images/hicolor/scalable/glogg.svg 132 133doc.path = $$PREFIX/share/doc/glogg 134doc.files += README COPYING 135 136desktop.path = $$PREFIX/share/applications 137desktop.files = glogg.desktop 138 139target.path = $$PREFIX/bin 140INSTALLS = target icon16 icon32 icon_svg doc desktop 141 142# Build directories 143debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 144release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 145debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 146release:MOC_DIR = $${OUT_PWD}/.moc/release-shared 147 148# Debug symbols in debug builds 149debug:QMAKE_CXXFLAGS += -g 150 151# Extra compiler arguments 152# QMAKE_CXXFLAGS += -Weffc++ 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