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/smart_ptr/src/*.cpp 83 84 INCLUDEPATH += $$BOOST_PATH 85} 86 87FORMS += optionsdialog.ui 88 89greaterThan(QT_VERSION, "4.4.0") { 90 FORMS += filtersdialog.ui 91} 92else { 93 message(Using old FiltersDialog) 94 FORMS += filtersdialog_old.ui 95} 96 97# For Windows icon 98RC_FILE = glogg.rc 99RESOURCES = glogg.qrc 100 101# Build HTML documentation (if 'markdown' is available) 102system(type markdown >/dev/null) { 103 MARKDOWN += doc/documentation.markdown 104} 105else { 106 message("markdown not found, HTML doc will not be generated") 107} 108 109doc_processor.name = markdown 110doc_processor.input = MARKDOWN 111doc_processor.output = doc/${QMAKE_FILE_BASE}.html 112doc_processor.commands = markdown ${QMAKE_FILE_NAME} | \ 113 sed -f finish.sed >${QMAKE_FILE_OUT} 114 115doc_processor.CONFIG += target_predeps 116doc_processor.variable_out = doc.files 117 118QMAKE_EXTRA_COMPILERS += doc_processor 119 120# Install (for unix) 121icon16.path = $$PREFIX/share/icons/hicolor/16x16/apps 122icon16.files = images/hicolor/16x16/glogg.png 123 124icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps 125icon32.files = images/hicolor/32x32/glogg.png 126 127icon_svg.path = $$PREFIX/share/icons/hicolor/scalable/apps 128icon_svg.files = images/hicolor/scalable/glogg.svg 129 130doc.path = $$PREFIX/share/doc/glogg 131doc.files += README COPYING 132 133desktop.path = $$PREFIX/share/applications 134desktop.files = glogg.desktop 135 136target.path = $$PREFIX/bin 137INSTALLS = target icon16 icon32 icon_svg doc desktop 138 139# Build directories 140debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared 141release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared 142debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared 143release:MOC_DIR = $${OUT_PWD}/.moc/release-shared 144 145# Debug symbols in debug builds 146debug:QMAKE_CXXFLAGS += -g 147 148# Extra compiler arguments 149# QMAKE_CXXFLAGS += -Weffc++ 150 151GPROF { 152 QMAKE_CXXFLAGS += -pg 153 QMAKE_LFLAGS += -pg 154} 155 156isEmpty(LOG_LEVEL) { 157 Release:DEFINES += FILELOG_MAX_LEVEL=\"logERROR\" 158 Debug:DEFINES += FILELOG_MAX_LEVEL=\"logDEBUG4\" 159} 160else { 161 message("Using specified log level: $$LOG_LEVEL") 162 DEFINES += FILELOG_MAX_LEVEL=\"$$LOG_LEVEL\" 163} 164 165# Official builds can be generated with `qmake VERSION="1.2.3"' 166isEmpty(VERSION):system(date >/dev/null) { 167 system([ -f .tarball-version ]) { 168 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`cat .tarball-version`\\\" 169 } 170 else { 171 QMAKE_CXXFLAGS += -DGLOGG_DATE=\\\"`date +'\"%F\"'`\\\" 172 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"`git describe`\\\" 173 QMAKE_CXXFLAGS += -DGLOGG_COMMIT=\\\"`git rev-parse --short HEAD`\\\" 174 } 175} 176else { 177 QMAKE_CXXFLAGS += -DGLOGG_VERSION=\\\"$$VERSION\\\" 178} 179 180