Subversion Repositories seema-scanner

Rev

Rev 8 | Rev 23 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 jakw 1
#------------------------------------------------------------
2
#
3
# SMScanner
4
#
9 jakw 5
# Control Interface and point cloud reconstruction interface
1 jakw 6
# for the SeeMa Lab Structured Light Scanner.
7
#
8
# Image Analysis and Computer Graphics, DTU, 2014
9
#
10
#------------------------------------------------------------
11
 
12
QT       += core gui
13
 
14
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
15
 
16
TARGET = SMScanner
17
TEMPLATE = app
18
 
4 jakw 19
HEADERS  += SMScanner.h \
20
        SMVideoWidget.h \
21
        SMPointCloudWidget.h \
22
        camera/Camera.h \
23
        projector/Projector.h \
24
        projector/OpenGLContext.h \
25
        codec/Codec.h \
26
        codec/CodecGrayCode.h \
27
        codec/CodecPhaseShift2x3.h \
28
        triangulator/Triangulator.h \
29
        cvtools.h \
30
        SMCalibrationParams.h \
31
        SMCaptureWorker.h \
9 jakw 32
        SMTriangulationWorker.h \
33
    rotationstage/RotationStage.h \
34
        SMPreferenceDialog.h
1 jakw 35
 
36
SOURCES += main.cpp\
2 jakw 37
        SMScanner.cpp \
38
        SMVideoWidget.cpp \
4 jakw 39
        SMPointCloudWidget.cpp \
40
        camera/Camera.cpp \
41
        codec/CodecGrayCode.cpp \
42
        codec/CodecPhaseShift2x3.cpp \
43
        triangulator/Triangulator.cpp \
44
        cvtools.cpp \
45
        SMCalibrationParams.cpp \
46
        SMCaptureWorker.cpp \
9 jakw 47
        SMTriangulationWorker.cpp \
48
    rotationstage/RotationStage.cpp \
49
        SMPreferenceDialog.cpp
1 jakw 50
 
51
 
4 jakw 52
FORMS    += SMScanner.ui \
9 jakw 53
    SMAboutDialog.ui \
54
    SMPreferenceDialog.ui
2 jakw 55
 
9 jakw 56
INCLUDEPATH += camera/ projector/ codec/ triangulator/ rotationstage/
2 jakw 57
 
58
 
4 jakw 59
# Operating System dependant linking and including
2 jakw 60
# Linux
61
unix:!macx {
62
    CONFIG += link_pkgconfig
63
    # Link VTK and Boost (no pkg-config)
64
    INCLUDEPATH += /usr/include/vtk-5.8/
65
    LIBS += -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
66
    # PCL pkg-config workaround
67
    LIBS += -lboost_system -lpcl_visualization -lpcl_common -lpcl_io -lpcl_search -lpcl_surface
68
    # PKG-config libs
69
    INCLUDEPATH += /usr/local/include/pcl-1.7 /usr/include/eigen3/
70
    PKGCONFIG += gl glu x11 xrandr opencv pcl_registration-1.7 pcl_visualization-1.7 pcl_surface-1.7 pcl_search-1.7 pcl_filters-1.7 pcl_kdtree-1.7 pcl_tracking-1.7 flann eigen3
71
}
72
# Windows
73
win32 {
74
    # Boost join
75
    DEFINES += DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
76
 
77
    # opencv
78
    INCLUDEPATH += "$$(OPENCV_INCLUDE_DIR)/" #C:\opencv\build\include
79
 
80
    CONFIG(debug,debug|release){
81
    #debug
82
    LIBS += -L"$$(OPENCV_DIR)" \ #C:\opencv\build\x64\vc10\lib
83
            -lopencv_core247d \
84
            -lopencv_highgui247d \
85
            -lopencv_imgproc247d \
86
            -lopencv_calib3d247d
87
    } else {
88
    #release
89
    LIBS += -L"$$(OPENCV_DIR)" \
90
            -lopencv_core247 \
91
            -lopencv_highgui247 \
92
            -lopencv_imgproc247 \
93
            -lopencv_calib3d247
94
    }
95
 
96
    # pcl
97
    INCLUDEPATH += "$$(PCL_INCLUDE_DIR)/" #C:\Program Files\PCL\include\pcl-1.7
98
 
99
    CONFIG(debug,debug|release){
100
    #debug
101
    LIBS += -L"$$(PCL_DIR)" \ #C:\Program Files\PCL\lib
102
            -lpcl_visualization_debug \
103
            -lpcl_io_debug \
104
            -lpcl_common_debug \
105
            -lpcl_features_debug \
106
            -lpcl_filters_debug \
107
            -lpcl_io_debug \
108
            -lpcl_io_ply_debug \
109
            -lpcl_kdtree_debug \
110
            -lpcl_keypoints_debug \
111
            -lpcl_octree_debug \
112
            -lpcl_registration_debug \
113
            -lpcl_sample_consensus_debug \
114
            -lpcl_search_debug \
115
            -lpcl_segmentation_debug \
116
            -lpcl_surface_debug \
117
            -lpcl_tracking_debug \
118
            -lpcl_visualization_debug
119
    } else {
120
    # release
121
    LIBS += -L"$$(PCL_DIR)" \
122
            -lpcl_visualization_release \
123
            -lpcl_io_release \
124
            -lpcl_common_release \
125
            -lpcl_features_release \
126
            -lpcl_filters_release \
127
            -lpcl_io_release \
128
            -lpcl_io_ply_release \
129
            -lpcl_kdtree_release \
130
            -lpcl_keypoints_release \
131
            -lpcl_octree_release \
132
            -lpcl_registration_release \
133
            -lpcl_sample_consensus_release \
134
            -lpcl_search_release \
135
            -lpcl_segmentation_release \
136
            -lpcl_surface_release \
137
            -lpcl_tracking_release \
138
            -lpcl_visualization_release
139
    }
140
 
141
    # pcl dependencies
142
    INCLUDEPATH += "$$(BOOST_ROOT)/include" \
143
                   "$$(EIGEN_ROOT)/include" \
144
                   "$$(FLANN_ROOT)/include"
145
    LIBS += -L"$$(BOOST_ROOT)/lib" -lboost_system-vc100-mt-1_50 -lboost_system-vc100-mt-gd-1_50
146
 
147
    # vtk
148
    INCLUDEPATH += "$$(VTK_INCLUDE_DIR)" #C:\Program Files\VTK\include\vtk-5.10
149
 
150
    CONFIG(debug,debug|release){
151
    #debug
152
    LIBS += -L"$$(VTK_DIR)" \ #C:\Program Files\VTK\lib\vtk-5.10
153
            -lvtkGraphics-gd \
154
            -lQVTK-gd \
155
            -lvtkCommon-gd \
156
            -lvtkFiltering-gd \
157
            -lvtkRendering-gd \
158
            -lvtkIO-gd \
159
            -lvtkpng-gd \
160
            -lvtksys-gd \
161
            -lvtktiff-gd \
162
            -lvtkjpeg-gd \
163
            -lvtkexpat-gd \
164
            -lvtkzlib-gd
165
    } else {
166
    # release
167
    LIBS += -L"$$(VTK_DIR)" \
168
            -lvtkGraphics \
169
            -lQVTK \
170
            -lvtkCommon \
171
            -lvtkFiltering \
172
            -lvtkRendering \
173
            -lvtkIO \
174
            -lvtkpng \
175
            -lvtksys \
176
            -lvtktiff \
177
            -lvtkjpeg \
178
            -lvtkexpat \
179
            -lvtkzlib
180
    }
181
 
4 jakw 182
}
183
# Mac OS X
184
macx {
185
    INCLUDEPATH += /opt/local/include/vtk-5.10/
186
    LIBS += -L/opt/local/lib/vtk-5.10/ -lQVTK -lvtkCommon -lvtkFiltering -lvtkRendering -lvtkIO -lvtkGraphics
187
    LIBS += -L/opt/local/lib/ -lboost_system-mt
188
    CONFIG += link_pkgconfig
189
    PKGCONFIG += opencv pcl_visualization-1.7 pcl_filters-1.7 pcl_search-1.7 pcl_registration-1.7
190
    DEFINES += BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
191
}
2 jakw 192
 
193
 
4 jakw 194
# Compile with system dependent OpenGL Context code
195
unix:!macx{
196
    SOURCES += projector/OpenGLContext.Unix.cpp
197
    LIBS += -lXxf86vm
2 jakw 198
}
4 jakw 199
win32{
200
    SOURCES += projector/OpenGLContext.Win.cpp
201
}
202
macx{
203
    CONFIG += objective_c
204
    OBJECTIVE_SOURCES += projector/OpenGLContext.Mac.mm
205
    LIBS += -framework Cocoa -framework OpenGL
206
}
2 jakw 207
 
4 jakw 208
 
8 jakw 209
# Compile with camera driver bindings
210
 
4 jakw 211
# Point Grey flycapture
212
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
213
    INCLUDEPATH += /usr/include/flycapture
214
    DEFINES += WITH_CAMERAPOINTGREY
215
    LIBS += -lflycapture
216
}
217
win32:exists("C:/Program Files/Point Grey Research/FlyCapture2/include/FlyCapture2.h"){
218
    DEFINES += WITH_CAMERAPOINTGREY
219
    INCLUDEPATH += "C:/Program Files/Point Grey Research/FlyCapture2/include/"
220
    LIBS += -L"C:/Program Files/Point Grey Research/FlyCapture2/lib64" -lFlyCapture2
221
}
2 jakw 222
contains(DEFINES, WITH_CAMERAPOINTGREY) {
223
    HEADERS += camera/CameraPointGrey.h
224
    SOURCES += camera/CameraPointGrey.cpp
225
}
226
 
9 jakw 227
# Compile with rotation stage driver
228
SOURCES += rotationstage/ArcusPerformaxDriver.c
229
unix:!macx{
230
    PKGCONFIG += libusb-1.0
231
}