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
|
From: Hauke Wintjen <hwintjen@rimpl-consulting.de>
Date: Fri, 29 Mar 2013 22:21:36 +0100
Subject: Use system wide libjpeg
---
Source/Core/Makefile | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/Source/Core/Makefile
+++ b/Source/Core/Makefile
@@ -5,14 +5,12 @@
INC_DIRS = \
../../Include \
../../ThirdParty/PSCommon/XnLib/Include \
- ../Drivers/OniFile/Formats \
- ../../ThirdParty/LibJPEG
+ ../Drivers/OniFile/Formats
SRC_FILES = \
*.cpp \
../Drivers/OniFile/Formats/XnCodec.cpp \
- ../Drivers/OniFile/Formats/XnStreamCompression.cpp \
- ../../ThirdParty/LibJPEG/*.c \
+ ../Drivers/OniFile/Formats/XnStreamCompression.cpp
ifeq ("$(OSTYPE)","Darwin")
INC_DIRS += /opt/local/include
@@ -23,7 +21,7 @@
LIB_NAME = OpenNI2
LIB_DIRS = ../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
-USED_LIBS = XnLib dl pthread
+USED_LIBS = XnLib dl pthread jpeg
ifneq ("$(OSTYPE)","Darwin")
USED_LIBS += rt
endif
@@ -32,4 +30,11 @@
CFLAGS += -Wall
+ifeq ($(shell ld -ljpeg -o /dev/null 1>&2 2> /dev/null; echo $$?), 0)
+ USED_LIBS += jpeg
+else
+ INC_DIRS += ../../ThirdParty/LibJPEG
+ SRC_FILES += ../../ThirdParty/LibJPEG/*.c
+endif
+
include ../../ThirdParty/PSCommon/BuildSystem/CommonCppMakefile
--- a/Source/Drivers/OniFile/Makefile
+++ b/Source/Drivers/OniFile/Makefile
@@ -6,15 +6,12 @@
. \
../../../Include \
../../../ThirdParty/PSCommon/XnLib/Include \
- ../../../ThirdParty/LibJPEG \
Formats
SRC_FILES = \
*.cpp \
Formats/*.cpp \
- XnLibExtensions/*.cpp \
- ../../../ThirdParty/LibJPEG/*.c
-
+ XnLibExtensions/*.cpp
ifeq ("$(OSTYPE)","Darwin")
INC_DIRS += /opt/local/include
@@ -25,7 +22,7 @@
LIB_NAME = OniFile
LIB_DIRS = ../../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
-USED_LIBS = XnLib pthread
+USED_LIBS = XnLib pthread jpeg
ifneq ("$(OSTYPE)","Darwin")
USED_LIBS += rt
endif
--- a/Source/Drivers/PS1080/Makefile
+++ b/Source/Drivers/PS1080/Makefile
@@ -16,8 +16,7 @@
DriverImpl/*.cpp\
Formats/*.cpp \
Include/*.cpp \
- Sensor/*.cpp \
- ../../../ThirdParty/LibJPEG/*.c
+ Sensor/*.cpp
ifeq ("$(OSTYPE)","Darwin")
@@ -30,7 +29,7 @@
LIB_DIRS += ../../../ThirdParty/PSCommon/XnLib/Bin/$(PLATFORM)-$(CFG)
LIB_DIRS += $(BIN_DIR)/$(PLATFORM)-$(CFG)
-USED_LIBS = XnLib dl pthread DepthUtils
+USED_LIBS = XnLib dl pthread DepthUtils jpeg
ifneq ("$(OSTYPE)","Darwin")
USED_LIBS += rt usb-1.0 udev
else
|