Subversion Repositories seema-scanner

Rev

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