EyeRecToo.pro 5.52 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 53
    src/Evaluation.cpp \
    src/pupil-tracking/PupilTrackingMethod.cpp
Thiago Santini's avatar
Thiago Santini committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

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
76
    $${TOP}/src/Reference.h \
77 78
    $${TOP}/src/LogWidget.h \
    $${TOP}/src/PerformanceMonitor.h \
79
    $${TOP}/src/PerformanceMonitorWidget.h \
Thiago Santini's avatar
Thiago Santini committed
80
	$${TOP}/src/CameraCalibration.h \
81 82
	$${TOP}/src/Overlay.h \
	$${TOP}/src/CommandManager.h \
83 84
	$${TOP}/src/ERWidget.h \
	$${TOP}/src/pupil-tracking/PupilTrackingMethod.h \
85
    src/pupil-detection/PuRe.h \
Thiago Santini's avatar
Thiago Santini committed
86 87
    src/Evaluation.h \
	src/pupil-tracking/PuReST.h
Thiago Santini's avatar
Thiago Santini committed
88 89 90 91

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

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

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

Debug:DBG_SUFFIX = "d"

OPENCVPATH="$${TOP}/deps/opencv-3.2.0"
INCLUDEPATH += $${OPENCVPATH}/include/
Thiago Santini's avatar
Thiago Santini committed
109 110
win32:CV_SUFFIX=320$${DBG_SUFFIX}
unix:CV_SUFFIX=$${DBG_SUFFIX}
Thiago Santini's avatar
Thiago Santini committed
111 112 113 114 115 116 117 118
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
119 120
    -lopencv_features2d$${CV_SUFFIX} \
    -lopencv_flann$${CV_SUFFIX} \
Thiago Santini's avatar
Thiago Santini committed
121 122 123 124
    -lopencv_highgui$${CV_SUFFIX} \
    -lopencv_imgcodecs$${CV_SUFFIX} \
    -lopencv_imgproc$${CV_SUFFIX} \
    -lopencv_videoio$${CV_SUFFIX} \
125 126
	-lopencv_video$${CV_SUFFIX} \
	-lopencv_aruco$${CV_SUFFIX}
Thiago Santini's avatar
Thiago Santini committed
127 128 129 130 131 132 133 134 135 136 137 138 139

# 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) {
140 141
	SOURCES += $${TOP}/src/pupil-detection/Starburst.cpp
	HEADERS += $${TOP}/src/pupil-detection/Starburst.h
Thiago Santini's avatar
Thiago Santini committed
142 143
}
contains(DEFINES, SWIRSKI) {
144 145
	SOURCES += $${TOP}/src/pupil-detection/Swirski.cpp
	HEADERS += $${TOP}/src/pupil-detection/Swirski.h
Thiago Santini's avatar
Thiago Santini committed
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171

    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
172 173 174 175 176 177 178
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
179 180 181 182 183 184 185

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=""
}