File: 2002-system-pugixml.patch

package info (click to toggle)
libsavitar 4.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 800 kB
  • sloc: cpp: 11,325; xml: 179; sh: 17; makefile: 7
file content (71 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download | duplicates (2)
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
@@ -15,7 +15,9 @@ if(BUILD_TESTS)
     find_package(Threads QUIET)
 endif()
 
-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)
     list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
@@ -76,7 +78,7 @@ else()
     add_library(Savitar SHARED ${savitar_SRCS})
 endif()
 
-set(Savitar_LINK_LIBRARIES pugixml)
+set(Savitar_LINK_LIBRARIES ${PUGIXML_LIBRARY})
 if(CMAKE_USE_PTHREADS_INIT)
     list(APPEND Savitar_LINK_LIBRARIES pthread)
 endif()
--- 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.
--- 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
@@ -18,7 +18,7 @@
 
 #include "SceneNode.h"
 #include "Namespace.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