summarylogtreecommitdiffstats
path: root/0007-Use-system-wide-tinyxml.patch
blob: 8fee137ae369f6a89ae9c78b2d6d794b205ed8df (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
From: Jochen Sprickerhof <jochen@sprickerhof.de>
Date: Fri, 6 Jul 2012 10:01:46 +0200
Subject: Use system wide tinyxml

---
 Platform/Linux/Build/OpenNI/Makefile |   13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/Platform/Linux/Build/OpenNI/Makefile b/Platform/Linux/Build/OpenNI/Makefile
index c4645f5..8c0a74d 100644
--- a/Platform/Linux/Build/OpenNI/Makefile
+++ b/Platform/Linux/Build/OpenNI/Makefile
@@ -4,13 +4,11 @@ BIN_DIR = ../../Bin
 
 INC_DIRS = \
 	../../../../Include \
-	../../../../Source \
-	../../../../Externals/TinyXml
+	../../../../Source
 
 SRC_FILES = \
 	../../../../Source/OpenNI/*.cpp \
-	../../../../Source/OpenNI/Linux/*.cpp \
-	../../../../Externals/TinyXml/*.cpp
+	../../../../Source/OpenNI/Linux/*.cpp
 
 ifeq ("$(OSTYPE)","Darwin")
 	INC_DIRS += /opt/local/include
@@ -25,6 +23,13 @@ ifneq ("$(OSTYPE)","Darwin")
 endif
 DEFINES = XN_EXPORTS
 
+ifeq ($(shell ld -ltinyxml -o /dev/null 1>&2 2> /dev/null; echo $$?), 0)
+  USED_LIBS += tinyxml
+else
+  INC_DIRS  += ../../../../Source/External/TinyXml
+  SRC_FILES += ../../../../Source/External/TinyXml/*.cpp
+endif
+
 include ../Common/CommonCppMakefile