summaryrefslogtreecommitdiff
blob: 0ad79ebf4d0d3c8a5343a2956ce95014341c4f91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
diff --git a/gui/gui.pro b/gui/gui.pro
index 0cbaebf..cb381dd 100644
--- 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
diff --git a/tools/dmake.cpp b/tools/dmake.cpp
index 298cb98..c3afd26 100644
--- 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));
@@ -341,9 +339,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";
diff --git a/oss-fuzz/Makefile b/oss-fuzz/Makefile
index 81cf654..26f9da9 100644
--- a/oss-fuzz/Makefile
+++ b/oss-fuzz/Makefile
@@ -6,8 +6,8 @@
 # make CXX=clang++-6.0 CXXFLAGS="-fsanitize=address" fuzz-client
 
 CPPCHECK_DIR=..
-INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals/tinyxml -I ${CPPCHECK_DIR}/externals
-SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/externals/tinyxml/tinyxml2.cpp ${CPPCHECK_DIR}/lib/*.cpp
+INCLUDE_DIR=-I ${CPPCHECK_DIR}/lib -I ${CPPCHECK_DIR}/externals/simplecpp -I ${CPPCHECK_DIR}/externals
+SRC_FILES=main.cpp type2.cpp ${CPPCHECK_DIR}/externals/simplecpp/simplecpp.cpp ${CPPCHECK_DIR}/lib/*.cpp
 
 all:	oss-fuzz-client	translate
 
diff --git a/Makefile b/Makefile
index 372647e..9d65717 100644
--- a/Makefile
+++ b/Makefile
@@ -179,8 +179,7 @@ LIBOBJ =      $(libcppdir)/analyzerinfo.o \
               $(libcppdir)/tokenlist.o \
               $(libcppdir)/valueflow.o
 
-EXTOBJ =      externals/simplecpp/simplecpp.o \
-              externals/tinyxml/tinyxml2.o
+EXTOBJ =      externals/simplecpp/simplecpp.o
 
 CLIOBJ =      cli/cmdlineparser.o \
               cli/cppcheckexecutor.o \
@@ -689,9 +688,6 @@ test/testvarid.o: test/testvarid.cpp lib/platform.h lib/config.h lib/settings.h
 externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h
 	$(CXX)  $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/simplecpp/simplecpp.o externals/simplecpp/simplecpp.cpp
 
-externals/tinyxml/tinyxml2.o: externals/tinyxml/tinyxml2.cpp externals/tinyxml/tinyxml2.h
-	$(CXX)  $(CPPFLAGS) $(CFG) $(CXXFLAGS) -w $(UNDEF_STRICT_ANSI) -c -o externals/tinyxml/tinyxml2.o externals/tinyxml/tinyxml2.cpp
-
 tools/clang-ast.o: tools/clang-ast.cpp
 	$(CXX) ${INCLUDE_FOR_LIB} $(CPPFLAGS) $(CFG) $(CXXFLAGS) $(UNDEF_STRICT_ANSI) -c -o tools/clang-ast.o tools/clang-ast.cpp
 
diff --git a/externals/externals.pri b/externals/externals.pri
index 7f0be8d..b1e94e0 100644
--- a/externals/externals.pri
+++ b/externals/externals.pri
@@ -1,9 +1,6 @@
 INCLUDEPATH += $${PWD} \
-               $${PWD}/simplecpp \
-               $${PWD}/tinyxml
+               $${PWD}/simplecpp
 
-HEADERS += $${PWD}/simplecpp/simplecpp.h \
-           $${PWD}/tinyxml/tinyxml2.h
+HEADERS += $${PWD}/simplecpp/simplecpp.h
 
-SOURCES += $${PWD}/simplecpp/simplecpp.cpp \
-           $${PWD}/tinyxml/tinyxml2.cpp
+SOURCES += $${PWD}/simplecpp/simplecpp.cpp