-
Notifications
You must be signed in to change notification settings - Fork 1
/
OpenRGBHidioPlugin.pro
112 lines (91 loc) · 5.64 KB
/
OpenRGBHidioPlugin.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
QT += \
gui \
widgets \
core \
win32:CONFIG += QTPLUGIN
TEMPLATE = lib
DEFINES += ORGBSAMPLEPLUGIN_LIBRARY
win32:CONFIG += c++17
unix:!macx {
QMAKE_CXXFLAGS += -std=c++17
}
#-----------------------------------------------------------------------------------------------#
# Application Configuration #
#-----------------------------------------------------------------------------------------------#
PLUGIN_VERSION = 0.1
#-----------------------------------------------------------------------------------------------#
# Automatically generated build information #
#-----------------------------------------------------------------------------------------------#
win32:BUILDDATE = $$system(date /t)
unix:BUILDDATE = $$system(date -R -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}")
GIT_COMMIT_ID = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse HEAD)
GIT_COMMIT_DATE = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ show -s --format=%ci HEAD)
GIT_BRANCH = $$system(git --git-dir $$_PRO_FILE_PWD_/.git --work-tree $$_PRO_FILE_PWD_ rev-parse --abbrev-ref HEAD)
#-----------------------------------------------------------------------------------------------#
# Inject vars in defines #
#-----------------------------------------------------------------------------------------------#
DEFINES += \
VERSION_STRING=\\"\"\"$$PLUGIN_VERSION\\"\"\" \
BUILDDATE_STRING=\\"\"\"$$BUILDDATE\\"\"\" \
GIT_COMMIT_ID=\\"\"\"$$GIT_COMMIT_ID\\"\"\" \
GIT_COMMIT_DATE=\\"\"\"$$GIT_COMMIT_DATE\\"\"\" \
GIT_BRANCH=\\"\"\"$$GIT_BRANCH\\"\"\" \
LATEST_BUILD_URL=\\"\"\"$$LATEST_BUILD_URL\\"\"\" \
#-------------------------------------------------------------------#
# Includes #
#-------------------------------------------------------------------#
INCLUDEPATH += \
OpenRGB/ \
OpenRGB/i2c_smbus \
OpenRGB/RGBController \
OpenRGB/net_port \
OpenRGB/dependencies/json \
HEADERS += \
OpenRGB/OpenRGBPluginInterface.h \
OpenRGB/ResourceManager.h \
OpenRGBHidioPlugin.h \
SOURCES += \
OpenRGBHidioPlugin.cpp \
#-------------------------------------------------------------------#
# Windows GitLab CI Configuration #
#-------------------------------------------------------------------#
win32:CONFIG(debug, debug|release) {
win32:DESTDIR = debug
}
win32:CONFIG(release, debug|release) {
win32:DESTDIR = release
}
win32:OBJECTS_DIR = _intermediate_$$DESTDIR/.obj
win32:MOC_DIR = _intermediate_$$DESTDIR/.moc
win32:RCC_DIR = _intermediate_$$DESTDIR/.qrc
win32:UI_DIR = _intermediate_$$DESTDIR/.ui
win32:contains(QMAKE_TARGET.arch, x86_64) {
LIBS += \
-lws2_32 \
-lole32 \
}
win32:contains(QMAKE_TARGET.arch, x86) {
LIBS += \
-lws2_32 \
-lole32 \
}
win32:DEFINES += \
_MBCS \
WIN32 \
_CRT_SECURE_NO_WARNINGS \
_WINSOCK_DEPRECATED_NO_WARNINGS \
WIN32_LEAN_AND_MEAN \
#-----------------------------------------------------------------------#
# Linux-specific Configuration #
#-----------------------------------------------------------------------#
unix:!macx {
}
#-----------------------------------------------------------------------#
# MacOS-specific Configuration #
#-----------------------------------------------------------------------#
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
macx: {
CONFIG += c++17
}
RESOURCES += \
resources.qrc