Package: libsavitar / 3.3.0-3

2002-system-pugixml.patch Patch series | download
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
Author: Gregor Riepl <onitake@gmail.com>
Description: Depend on system pugixml.
  Upstream bundled their own version of pugixml.
  On Debian, we have a maintained packages of this library,
  so use that instead.
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,9 @@
 option(BUILD_STATIC "Build as a static library" OFF)
 
 
-add_subdirectory(pugixml)
+find_path(PUGIXML_INCLUDE_DIR "pugixml.hpp" REQUIRED)
+find_library(PUGIXML_LIBRARY pugixml REQUIRED)
+include_directories(${PUGIXML_INCLUDE_DIR} SYSTEM)
 
 if(BUILD_PYTHON)
     set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
@@ -65,7 +67,7 @@
     add_library(Savitar SHARED ${savitar_SRCS})
 endif()
 
-target_link_libraries(Savitar PUBLIC pugixml)
+target_link_libraries(Savitar PUBLIC ${PUGIXML_LIBRARY})
 
 if(NOT WIN32 OR CMAKE_COMPILER_IS_GNUCXX)
     set_target_properties(Savitar PROPERTIES COMPILE_FLAGS -fPIC)
--- a/src/MeshData.cpp
+++ b/src/MeshData.cpp
@@ -17,7 +17,7 @@
  */
 
 #include "MeshData.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
 #include <iostream>
 
 using namespace Savitar;
--- 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;
--- a/src/SceneNode.cpp
+++ b/src/SceneNode.cpp
@@ -17,7 +17,7 @@
  */
 
 #include "SceneNode.h"
-#include "../pugixml/src/pugixml.hpp"
+#include <pugixml.hpp>
 #include <iostream>
 using namespace Savitar;
 
--- 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