EyeRecToo.pro 5.45 KB
Newer Older
Thiago Santini's avatar
Thiago Santini committed
1 2 3 4
QT       += core gui multimedia

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

5 6
CONFIG += c++14

Thiago Santini's avatar
Thiago Santini committed
7 8 9 10 11 12
TOP = $$PWD

TARGET = EyeRecToo
TEMPLATE = app
win32: RC_ICONS = $${TOP}/icons/eyerectoo.ico

13 14 15
# For profiling with msvc
#TEMPLATE = vcapp

Thiago Santini's avatar
Thiago Santini committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
DEFINES += TURBOJPEG

# Note: Starburst and Swirski are not currently included in the repository; do not enable
#DEFINES += STARBURST
#DEFINES += SWIRSKI

SOURCES +=\
    $${TOP}/src/main.cpp\
    $${TOP}/src/MainWindow.cpp \
    $${TOP}/src/utils.cpp\
    $${TOP}/src/FrameGrabber.cpp \
    $${TOP}/src/Camera.cpp \
    $${TOP}/src/ImageProcessor.cpp \
    $${TOP}/src/EyeImageProcessor.cpp \
    $${TOP}/src/pupil-detection/ElSe.cpp \
    $${TOP}/src/pupil-detection/ExCuSe.cpp \
    $${TOP}/src/CameraWidget.cpp \
    $${TOP}/src/FieldImageProcessor.cpp \
    $${TOP}/src/Synchronizer.cpp \
    $${TOP}/src/GazeEstimationWidget.cpp \
    $${TOP}/src/GazeEstimation.cpp \
    $${TOP}/src/gaze-estimation/PolyFit.cpp \
    $${TOP}/src/gaze-estimation/Homography.cpp \
    $${TOP}/src/DataRecorder.cpp \
    $${TOP}/src/NetworkStream.cpp \
Thiago Santini's avatar
Thiago Santini committed
41
    $${TOP}/src/Reference.cpp \
42 43
    $${TOP}/src/LogWidget.cpp \
    $${TOP}/src/PerformanceMonitor.cpp \
44
    $${TOP}/src/PerformanceMonitorWidget.cpp \
45
	$${TOP}/src/CameraCalibration.cpp \
Thiago Santini's avatar
Thiago Santini committed
46
	$${TOP}/src/pupil-detection/PupilDetectionMethod.cpp \
47 48
	$${TOP}/src/Overlay.cpp \
	$${TOP}/src/CommandManager.cpp \
49
	$${TOP}/src/ERWidget.cpp \
Thiago Santini's avatar
Thiago Santini committed
50
	src/pupil-tracking/PuReST.cpp \
51
    src/pupil-detection/PuRe.cpp \
Thiago Santini's avatar
Thiago Santini committed
52
    src/pupil-tracking/PupilTrackingMethod.cpp
Thiago Santini's avatar
Thiago Santini committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74

HEADERS  += \
    $${TOP}/src/MainWindow.h\
    $${TOP}/src/utils.h \
    $${TOP}/src/FrameGrabber.h \
    $${TOP}/src/Camera.h \
    $${TOP}/src/ImageProcessor.h \
    $${TOP}/src/EyeImageProcessor.h \
    $${TOP}/src/pupil-detection/PupilDetectionMethod.h \
    $${TOP}/src/pupil-detection/ElSe.h \
    $${TOP}/src/pupil-detection/ExCuSe.h \
    $${TOP}/src/CameraWidget.h \
    $${TOP}/src/InputWidget.h \
    $${TOP}/src/FieldImageProcessor.h \
    $${TOP}/src/Synchronizer.h \
    $${TOP}/src/GazeEstimationWidget.h \
    $${TOP}/src/GazeEstimation.h \
    $${TOP}/src/gaze-estimation/GazeEstimationMethod.h \
    $${TOP}/src/gaze-estimation/PolyFit.h \
    $${TOP}/src/gaze-estimation/Homography.h \
    $${TOP}/src/DataRecorder.h \
    $${TOP}/src/NetworkStream.h \
Thiago Santini's avatar
Thiago Santini committed
75
    $${TOP}/src/Reference.h \
76 77
    $${TOP}/src/LogWidget.h \
    $${TOP}/src/PerformanceMonitor.h \
78
    $${TOP}/src/PerformanceMonitorWidget.h \
Thiago Santini's avatar
Thiago Santini committed
79
	$${TOP}/src/CameraCalibration.h \
80 81
	$${TOP}/src/Overlay.h \
	$${TOP}/src/CommandManager.h \
82 83
	$${TOP}/src/ERWidget.h \
	$${TOP}/src/pupil-tracking/PupilTrackingMethod.h \
84
    src/pupil-detection/PuRe.h \
Thiago Santini's avatar
Thiago Santini committed
85
	src/pupil-tracking/PuReST.h
Thiago Santini's avatar
Thiago Santini committed
86 87 88 89

FORMS    += \
    $${TOP}/src/MainWindow.ui \
    $${TOP}/src/CameraWidget.ui \
Thiago Santini's avatar
Thiago Santini committed
90
    $${TOP}/src/GazeEstimationWidget.ui \
91
    $${TOP}/src/LogWidget.ui \
92
	$${TOP}/src/PerformanceMonitorWidget.ui
Thiago Santini's avatar
Thiago Santini committed
93 94 95 96 97

RESOURCES += \
    $${TOP}/resources.qrc

INCLUDEPATH += "$${TOP}/src"
Thiago Santini's avatar
Thiago Santini committed
98 99 100
unix{
    LIBS += "-L$${TOP}/deps/runtime/x86_64-linux-gnu/"
}
Thiago Santini's avatar
Thiago Santini committed
101 102 103 104 105

Debug:DBG_SUFFIX = "d"

OPENCVPATH="$${TOP}/deps/opencv-3.2.0"
INCLUDEPATH += $${OPENCVPATH}/include/
Thiago Santini's avatar
Thiago Santini committed
106 107
win32:CV_SUFFIX=320$${DBG_SUFFIX}
unix:CV_SUFFIX=$${DBG_SUFFIX}
Thiago Santini's avatar
Thiago Santini committed
108 109 110 111 112 113 114 115
win32:contains(QMAKE_HOST.arch, x86_64) {
    LIBS += "-L$${OPENCVPATH}/x64/vc14/lib/"
} else {
    LIBS += "-L$${OPENCVPATH}/x86/vc14/lib/"
}
LIBS += \
    -lopencv_calib3d$${CV_SUFFIX} \
    -lopencv_core$${CV_SUFFIX} \
Thiago Santini's avatar
Thiago Santini committed
116 117
    -lopencv_features2d$${CV_SUFFIX} \
    -lopencv_flann$${CV_SUFFIX} \
Thiago Santini's avatar
Thiago Santini committed
118 119 120 121
    -lopencv_highgui$${CV_SUFFIX} \
    -lopencv_imgcodecs$${CV_SUFFIX} \
    -lopencv_imgproc$${CV_SUFFIX} \
    -lopencv_videoio$${CV_SUFFIX} \
122 123
	-lopencv_video$${CV_SUFFIX} \
	-lopencv_aruco$${CV_SUFFIX}
Thiago Santini's avatar
Thiago Santini committed
124 125 126 127 128 129 130 131 132 133 134 135 136

# JPEG-TURBO
contains(DEFINES, TURBOJPEG) {
    INCLUDEPATH += "$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo64/include/"
    win32:contains(QMAKE_HOST.arch, x86_64) {
        LIBS += "-L$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo64/lib/"
    } else {
        LIBS += "-L$${TOP}/deps/libjpeg-turbo-1.5.1/libjpeg-turbo32/lib/"
    }
    LIBS += -lturbojpeg
}

contains(DEFINES, STARBURST) {
137 138
	SOURCES += $${TOP}/src/pupil-detection/Starburst.cpp
	HEADERS += $${TOP}/src/pupil-detection/Starburst.h
Thiago Santini's avatar
Thiago Santini committed
139 140
}
contains(DEFINES, SWIRSKI) {
141 142
	SOURCES += $${TOP}/src/pupil-detection/Swirski.cpp
	HEADERS += $${TOP}/src/pupil-detection/Swirski.h
Thiago Santini's avatar
Thiago Santini committed
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168

    TBB_INC_DIR = $${TOP}/deps/tbb43/include
    TBB_LIB_DIR = $${TOP}/deps/tbb43/lib/ia32/vc11
    INCLUDEPATH += "$${TBB_INC_DIR}"
    LIBS += "-L$${TBB_LIB_DIR}"
    LIBS += -ltbb
}

# Work around for bad visual studio update (msvc14)
win32{
    INCLUDEPATH += "C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt"
    contains(QMAKE_HOST.arch, x86_64) {
        LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x64"
    } else {
        LIBS += -L"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.10240.0/ucrt/x86"
    }
}

# Copy plugins
win32{
    copydata.commands = (robocopy $$PWD/deps/runtime/x64/Release/plugins $$OUT_PWD/plugins /E) ^& exit 0
    first.depends = $(first) copydata
    export(first.depends)
    export(copydata.commands)
    QMAKE_EXTRA_TARGETS += first copydata
}
Thiago Santini's avatar
Thiago Santini committed
169 170 171 172 173 174 175
unix{
    copydata.commands = $(COPY_DIR) $$PWD/deps/runtime/x86_64-linux-gnu/plugins $$OUT_PWD
    first.depends = $(first) copydata
    export(first.depends)
    export(copydata.commands)
    QMAKE_EXTRA_TARGETS += first copydata
}
Thiago Santini's avatar
Thiago Santini committed
176 177 178 179 180 181 182

system("git --version"):{
    GIT_VERSION=$$system(git --git-dir $${TOP}/../.git --work-tree $$TOP describe --always --tags)
    DEFINES += GIT_VERSION=\\\"$$GIT_VERSION\\\"
} else {
    GIT_VERSION=""
}