Subversion Repositories seema-scanner

Rev

Rev 248 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#------------------------------------------------------------
#
# SMScanner
#
# Control Interface and point cloud reconstruction interface
# for the SeeMa Lab Structured Light Scanner.
#
# Supported OS: Ubuntu 18.04
#
# Dependencies: Qt 5, OpenCV 3.x, PCL 1.8.1 and VTK 8 from ppa
#
# Image Analysis and Computer Graphics, DTU, 2018
#
#------------------------------------------------------------

QT += core gui testlib

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = SMScanner
TEMPLATE = app

CONFIG += c++11

HEADERS  += SMScanner.h \
        SMVideoWidget.h \
        SMPointCloudWidget.h \
        camera/Camera.h \
        projector/Projector.h \
        projector/ProjectorOpenGL.h \
        projector/OpenGLContext.h \
        cvtools.h \
        SMCaptureWorker.h \
        rotationstage/RotationStage.h \
        SMPreferenceDialog.h \
        SMTypes.h \
        SMCalibrationWorker.h \
        SMExportWorker.h \
        #SMCalibrationWorkerArUco.h \
        SMCalibrationParameters.h \
        SMReconstructionWorker.h \
        #SMMeshingWorker.h \
        algorithm/Algorithm.h \
        algorithm/AlgorithmGrayCode.h \
        algorithm/AlgorithmGrayCodeHorzVert.h \
        algorithm/AlgorithmLineShift.h \
        algorithm/AlgorithmPhaseShiftThreeFreq.h \
        algorithm/AlgorithmPhaseShiftTwoFreq.h \
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.h \
        algorithm/AlgorithmPhaseShiftEmbedded.h \
        algorithm/algorithmtools.h \
        SMVideoZoomWidget.h \
        SMLogDialog.h

SOURCES += main.cpp\
        SMScanner.cpp \
        SMVideoWidget.cpp \
        SMPointCloudWidget.cpp \
        camera/Camera.cpp \
        projector/ProjectorOpenGL.cpp \
        cvtools.cpp \
        SMCaptureWorker.cpp \
        rotationstage/RotationStage.cpp \
        SMPreferenceDialog.cpp \
        SMCalibrationWorker.cpp \
        SMExportWorker.cpp \
        #SMCalibrationWorkerArUco.cpp \
        SMCalibrationParameters.cpp \
        SMReconstructionWorker.cpp \
        #SMMeshingWorker.cpp \
        algorithm/AlgorithmGrayCode.cpp \
        algorithm/AlgorithmGrayCodeHorzVert.cpp \
        algorithm/AlgorithmLineShift.cpp \
        algorithm/AlgorithmPhaseShiftThreeFreq.cpp \
        algorithm/AlgorithmPhaseShiftTwoFreq.cpp \
        algorithm/AlgorithmPhaseShiftTwoFreqHorzVert.cpp \
        algorithm/AlgorithmPhaseShiftEmbedded.cpp \
        SMVideoZoomWidget.cpp \
    SMLogDialog.cpp

FORMS    += SMScanner.ui \
        SMAboutDialog.ui \
        SMPreferenceDialog.ui \
    SMLogDialog.ui

INCLUDEPATH += camera/ projector/ algorithm/ triangulator/ rotationstage/ calibration/


# Operating System dependant linking and including
# Linux
unix:!macx {
    CONFIG += link_pkgconfig

    # OpenCV
    PKGCONFIG += opencv
    LIBS += -lopencv_ximgproc -lopencv_aruco

    # VTK 8
    INCLUDEPATH += /opt/vtk-opt/include/vtk-8.1
    LIBS += -L/opt/vtk-opt/lib -lvtkIOImage-8.1 -lvtkCommonExecutionModel-8.1 -lvtkCommonDataModel-8.1 -lvtkCommonMath-8.1 -lvtkCommonCore-8.1 -lvtkRenderingCore-8.1 -lvtkRenderingOpenGL2-8.1 -lvtkFiltersCore-8.1 -lvtkGUISupportQt-8.1
    QMAKE_RPATHDIR += /opt/vtk-opt/lib/
    QMAKE_RPATHLINKDIR += /opt/vtk-opt/lib

    # PCL
    INCLUDEPATH += /opt/pcl-opt/include/pcl-1.8
    LIBS += -lboost_system -L/opt/pcl-opt/lib -lpcl_visualization -lpcl_registration -lpcl_common -lpcl_features -lpcl_visualization -lpcl_io -lpcl_tracking -lpcl_filters -lpcl_sample_consensus -lpcl_surface -lpcl_search -lpcl_kdtree -lpcl_octree -lflann -lflann_cpp -lOpenNI -lOpenNI2
    #PKGCONFIG += pcl_common-1.8 pcl_visualization-1.8 pcl_search-1.8 pcl_filters-1.8 pcl_kdtree-1.8 pcl_tracking-1.8 pcl_tracking-1.8 pcl_sample_consensus-1.8 pcl_surface-1.8
    QMAKE_RPATHDIR += /opt/pcl-opt/lib/
    QMAKE_RPATHLINKDIR += /opt/pcl-opt/lib

    # Eigen
    PKGCONFIG += eigen3

    # Ceres
    CONFIG += c++11
    LIBS += -fopenmp # -ltbb -ltbbmalloc -ltbbmalloc_proxy
    LIBS += -lceres -lglog
    #LIBS += -lcholmod
    QMAKE_CXXFLAGS += -fopenmp
}

# Compile with system dependent OpenGL Context code
unix:!macx{
    SOURCES += projector/OpenGLContext.Xscreens.cpp
    LIBS += -lXxf86vm

    # OpenGL/X11
    PKGCONFIG += gl glu x11
}

# Compile with camera driver bindings

# Point Grey flycapture
unix:!macx:exists(/usr/include/flycapture/FlyCapture2.h){
    INCLUDEPATH += /usr/include/flycapture
    DEFINES += WITH_CAMERAPOINTGREY
    LIBS += -lflycapture
}
contains(DEFINES, WITH_CAMERAPOINTGREY) {
    HEADERS += camera/CameraPointGrey.h
    SOURCES += camera/CameraPointGrey.cpp
}

# Compile with rotation stage driver
SOURCES += rotationstage/ArcusPerformaxDriver.c
unix:!macx{
    PKGCONFIG += libusb-1.0
}