EyeRecToo.pro 5.41 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 50
	$${TOP}/src/ERWidget.cpp \
    src/pupil-tracking/PupiTtrackingMethod.cpp \
    src/pupil-tracking/PuReTy.cpp \
    src/pupil-detection/PuRe.cpp
Thiago Santini's avatar
Thiago Santini committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

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

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

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

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

Debug:DBG_SUFFIX = "d"

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

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

    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
166 167 168 169 170 171 172
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
173 174 175 176 177 178 179

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