EyeRecToo.pro 5.51 KB
Newer Older
Thiago Santini's avatar
Thiago Santini committed
1 2 3 4 5 6 7 8 9 10
QT       += core gui multimedia

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TOP = $$PWD

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

11 12 13
# For profiling with msvc
#TEMPLATE = vcapp

Thiago Santini's avatar
Thiago Santini committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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
39
    $${TOP}/src/Reference.cpp \
40 41
    $${TOP}/src/LogWidget.cpp \
    $${TOP}/src/PerformanceMonitor.cpp \
42
    $${TOP}/src/PerformanceMonitorWidget.cpp \
43
	$${TOP}/src/CameraCalibration.cpp \
Thiago Santini's avatar
Thiago Santini committed
44
	$${TOP}/src/pupil-detection/PupilDetectionMethod.cpp \
45 46
	$${TOP}/src/Overlay.cpp \
	$${TOP}/src/CommandManager.cpp \
47 48 49
	$${TOP}/src/ERWidget.cpp \
    src/pupil-tracking/PupiTtrackingMethod.cpp \
    src/pupil-tracking/PuReTy.cpp \
50 51
    src/pupil-detection/PuRe.cpp \
    src/Evaluation.cpp
Thiago Santini's avatar
Thiago Santini committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73

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
74
    $${TOP}/src/Reference.h \
75 76
    $${TOP}/src/LogWidget.h \
    $${TOP}/src/PerformanceMonitor.h \
77
    $${TOP}/src/PerformanceMonitorWidget.h \
Thiago Santini's avatar
Thiago Santini committed
78
	$${TOP}/src/CameraCalibration.h \
79 80
	$${TOP}/src/Overlay.h \
	$${TOP}/src/CommandManager.h \
81 82 83
	$${TOP}/src/ERWidget.h \
	$${TOP}/src/pupil-tracking/PupilTrackingMethod.h \
    src/pupil-tracking/PuReTy.h \
84 85
    src/pupil-detection/PuRe.h \
    src/Evaluation.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 93
    $${TOP}/src/PerformanceMonitorWidget.ui \
    src/Evaluation.ui
Thiago Santini's avatar
Thiago Santini committed
94 95 96 97 98

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

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

Debug:DBG_SUFFIX = "d"

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

# 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) {
138 139
	SOURCES += $${TOP}/src/pupil-detection/Starburst.cpp
	HEADERS += $${TOP}/src/pupil-detection/Starburst.h
Thiago Santini's avatar
Thiago Santini committed
140 141
}
contains(DEFINES, SWIRSKI) {
142 143
	SOURCES += $${TOP}/src/pupil-detection/Swirski.cpp
	HEADERS += $${TOP}/src/pupil-detection/Swirski.h
Thiago Santini's avatar
Thiago Santini committed
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 169

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

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