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