QXTINSTALLDIR = /usr
include(../../config.pri)
isEmpty(target.path):  target.path   = $${QXTINSTALLDIR}/lib
isEmpty(docs.path):    docs.path     = $${QXTINSTALLDIR}/share/doc/libqxt
isEmpty(include.path): include.path  = $${QXTINSTALLDIR}/include/Qxt
isEmpty(bin.path):     bin.path      = $${QXTINSTALLDIR}/bin
include(../qxtbuild.prf)

contains(CONFIG, coverage) {
    QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
    QMAKE_LIBS += -lgcov
    
    zerocounters.commands = @lcov --directory \$(OBJECTS_DIR) --zerocounters
    QMAKE_EXTRA_UNIX_TARGETS *= zerocounters
    
    capture.commands = @mkdir -p ../../coverage
    capture.commands += && lcov --directory \$(OBJECTS_DIR) --capture --output-file ../../coverage/\$(QMAKE_TARGET).cov
    capture.filters = \"/usr/*\" \"moc_*.cpp\" \"qrc_*.cpp\"
    capture.commands += && lcov --remove ../../coverage/\$(QMAKE_TARGET).cov $$capture.filters --output-file ../../coverage/\$(QMAKE_TARGET).cov
    QMAKE_EXTRA_UNIX_TARGETS *= capture
    
    genhtml.commands = @genhtml --output-directory ../../coverage/\$(QMAKE_TARGET) ../../coverage/\$(QMAKE_TARGET).cov
    genhtml.commands += && xdg-open ../../coverage/\$(QMAKE_TARGET)/index.html
    QMAKE_EXTRA_UNIX_TARGETS *= genhtml
}
