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
|
From c436082126399a8b48ea763f26a3d1434b40728f Mon Sep 17 00:00:00 2001
From: Eli Schwartz <eschwartz93@gmail.com>
Date: Mon, 9 Apr 2018 12:36:35 -0400
Subject: [PATCH] Do not vendor the pugixml library
This prevents trying to co-install pugixml with existing system
libraries, and also fixes the includes for pugixml.hpp to actually use
the include path added by find_package/add_subdirectory instead of a
hardcoded relative path.
---
CMakeLists.txt | 2 +-
src/MeshData.cpp | 2 +-
src/Scene.cpp | 2 +-
src/SceneNode.cpp | 2 +-
src/ThreeMFParser.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f22d42e..e78b1f8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,7 +15,7 @@ if(BUILD_TESTS)
find_package(Threads QUIET)
endif()
-add_subdirectory(pugixml)
+find_package(pugixml REQUIRED)
if(BUILD_PYTHON)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
diff --git a/src/MeshData.cpp b/src/MeshData.cpp
index 97c089a..7c4de46 100644
--- a/src/MeshData.cpp
+++ b/src/MeshData.cpp
@@ -17,7 +17,7 @@
*/
#include "MeshData.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
#include <cstring>
#include <iostream>
#include <stdexcept> //For std::runtime_error.
diff --git a/src/Scene.cpp b/src/Scene.cpp
index 7a40570..86e9295 100644
--- a/src/Scene.cpp
+++ b/src/Scene.cpp
@@ -17,7 +17,7 @@
*/
#include "Scene.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
#include <iostream>
#include <string>
using namespace Savitar;
diff --git a/src/SceneNode.cpp b/src/SceneNode.cpp
index db686e9..8c9dd8c 100644
--- a/src/SceneNode.cpp
+++ b/src/SceneNode.cpp
@@ -18,7 +18,7 @@
#include "SceneNode.h"
#include "Namespace.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
#include <iostream>
using namespace Savitar;
diff --git a/src/ThreeMFParser.h b/src/ThreeMFParser.h
index 3394683..a0f6691 100644
--- a/src/ThreeMFParser.h
+++ b/src/ThreeMFParser.h
@@ -21,7 +21,7 @@
#include "SavitarExport.h"
#include "SceneNode.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
#include <string>
namespace Savitar
--
2.31.1
|