-
Notifications
You must be signed in to change notification settings - Fork 0
/
qjpeg-turbo.pro
50 lines (38 loc) · 1.46 KB
/
qjpeg-turbo.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
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
39
40
41
42
43
44
45
46
47
48
49
50
TARGET = qjpeg-turbo
TEMPLATE = lib
CONFIG += plugin
QT += core gui
target.path = $$[QT_INSTALL_PLUGINS]/imageformats
INSTALLS += target
DEFINES += NO_QT_PRIVATE_HEADERS
CONFIG(auto_install_plugin):DESTDIR = $$[QT_INSTALL_PLUGINS]/imageformats
# libjpeg-turbo; use the LIBJPEGTURBO_PATH variable if available, or default to trying
# libjpeg-turbo{,-arch}
isEmpty($$LIBJPEGTURBO_PATH) {
LIBJPEGTURBO_PATH = $${_PRO_FILE_PWD_}/libjpeg-turbo
!exists($$LIBJPEGTURBO_PATH) {
# Detect architecture where not available
win32-msvc* {
COMPILERVERSION = $$system(ml64.exe 2> nul)
!isEmpty(COMPILERVERSION) { CONFIG += x86_64 }
else { CONFIG += x86 }
}
ARCHFLAGS = $$CONFIG
!contains(ARCHFLAGS,x86):!contains(ARCHFLAGS,x86_64):ARCHFLAGS = $$QT_CONFIG
contains(ARCHFLAGS,x86_64) { LIBJPEGTURBO_PATH = "$${LIBJPEGTURBO_PATH}-x86_64" }
else:contains(ARCHFLAGS,x86) { LIBJPEGTURBO_PATH = "$${LIBJPEGTURBO_PATH}-x86" }
!exists($$LIBJPEGTURBO_PATH):error("No libjpeg-turbo build found. Build in " \
"./libjpeg-turbo/ or set LIBJPEGTURBO_PATH")
}
}
INCLUDEPATH += $$LIBJPEGTURBO_PATH
win32 {
LIBS += $${LIBJPEGTURBO_PATH}/build/turbojpeg-static.lib
INCLUDEPATH += $${LIBJPEGTURBO_PATH}/build/
} else {
LIBS += $${LIBJPEGTURBO_PATH}/.libs/libturbojpeg.a
}
SOURCES += \
main.cpp \
qjpeghandler.cpp
HEADERS += qjpeghandler_p.h