Subversion Repositories seema-scanner

Rev

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