Subversion Repositories seema-scanner

Rev

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