--- /dev/null
+--- a/externals/externals.pri
++++ b/externals/externals.pri
+@@ -1,9 +1,6 @@
+ INCLUDEPATH += $${PWD} \\r
+- $${PWD}/simplecpp \\r
+- $${PWD}/tinyxml\r
++ $${PWD}/simplecpp\r
+ \r
+-HEADERS += $${PWD}/simplecpp/simplecpp.h \\r
+- $${PWD}/tinyxml/tinyxml2.h\r
++HEADERS += $${PWD}/simplecpp/simplecpp.h\r
+ \r
+-SOURCES += $${PWD}/simplecpp/simplecpp.cpp \\r
+- $${PWD}/tinyxml/tinyxml2.cpp\r
++SOURCES += $${PWD}/simplecpp/simplecpp.cpp\r
+--- a/gui/gui.pro
++++ b/gui/gui.pro
+@@ -15,6 +15,7 @@ contains(LINKCORE, [yY][eE][sS]) {
+ DEFINES += CPPCHECKLIB_IMPORT
+ }
+ LIBS += -L$$PWD/../externals
++LIBS += $(shell $(PKG_CONFIG) --libs tinyxml2)
+
+ DESTDIR = .
+ RCC_DIR = temp
+--- a/tools/dmake.cpp
++++ b/tools/dmake.cpp
+@@ -122,7 +122,6 @@ int main(int argc, char **argv)
+
+ std::vector<std::string> extfiles;
+ extfiles.push_back("externals/simplecpp/simplecpp.cpp");
+- extfiles.push_back("externals/tinyxml/tinyxml2.cpp");
+
+ std::vector<std::string> clifiles;
+ getCppFiles(clifiles, "cli/", false);
+@@ -171,7 +170,6 @@ int main(int argc, char **argv)
+ std::ofstream fout1("test/testfiles.pri");
+ if (fout1.is_open()) {
+ fout1 << "# no manual edits - this file is autogenerated by dmake\n\n";
+- fout1 << "INCLUDEPATH += ../externals/tinyxml\n";
+ fout1 << "\n\nSOURCES += ";
+ for (unsigned int i = 0; i < testfiles.size(); ++i) {
+ const std::string filename(testfiles[i].substr(5));
+@@ -335,9 +333,9 @@ int main(int argc, char **argv)
+ << "endif\n\n";
+
+ makeConditionalVariable(fout, "PREFIX", "/usr");
+- makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp -isystem externals/tinyxml");
+- makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp -isystem externals/tinyxml");
+- makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp -isystem externals/tinyxml");
++ makeConditionalVariable(fout, "INCLUDE_FOR_LIB", "-Ilib -isystem externals -isystem externals/simplecpp");
++ makeConditionalVariable(fout, "INCLUDE_FOR_CLI", "-Ilib -isystem externals/simplecpp");
++ makeConditionalVariable(fout, "INCLUDE_FOR_TEST", "-Ilib -Icli -isystem externals/simplecpp");
+
+ fout << "BIN=$(DESTDIR)$(PREFIX)/bin\n\n";
+ fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml on Linux\n";