-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClipNet.pro
150 lines (123 loc) · 3.92 KB
/
ClipNet.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17
# choose your (pseudo-)cryptographic poison
CONFIG += cryptopp
#CONFIG += simplecrypt
#CONFIG += obfuscate
CONFIG(debug, debug|release) {
DEFINES += QT_DEBUG
DESTDIR = deploy/debug
} else {
DESTDIR = deploy/release
}
RESOURCES += ./ClipNet.qrc
# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
mac {
DEFINES += QT_OSX
}
unix:!mac {
DEFINES += QT_LINUX
INCLUDEPATH += ../miniaudio
}
win32 {
DEFINES += QT_WIN
# for Registry API
LIBS += -ladvapi32
CONFIG(static) {
# make sure we match the linkage for Crypto++
CONFIG(debug, debug|release) {
QMAKE_CFLAGS += /MTd
QMAKE_CXXFLAGS += /MTd
} else {
QMAKE_CFLAGS += /MT
QMAKE_CXXFLAGS += /MT
}
}
}
SOURCES += \
Cue.cpp \
Receiver.cpp \
Secure.cpp \
Sender.cpp \
main.cpp \
mainwindow.cpp
HEADERS += \
Cue.h \
Receiver.h \
Secure.h \
Sender.h \
mainwindow.h
FORMS += \
mainwindow.ui
cryptopp {
CRYPTOPP_PREFIX = $$(CRYPTOPP_INSTALL_ROOT)
isEmpty(CRYPTOPP_PREFIX){
win32 {
CRYPTOPP_PREFIX = M:\Projects\cryptopp
}
unix:!mac {
CRYPTOPP_PREFIX = /home/bob/projects/cryptopp/x86_64
}
}
# from a security standpoint, Crypt++ is preferrable to
# SimpleCrypt (as SimpleCrypt is preferrable to nothing
# at all)...
DEFINES += USE_ENCRYPTION
DEFINES += CRYPTOPP
INCLUDEPATH += $$CRYPTOPP_PREFIX
win32 {
LIBS += -lcryptlib
CONFIG(debug, debug|release) {
LIBS += -L$$CRYPTOPP_PREFIX\x64\Output\Debug
} else {
LIBS += -L$$CRYPTOPP_PREFIX\x64\Output\Release
}
}
unix:!mac {
# https://stackoverflow.com/questions/6578484/telling-gcc-directly-to-link-a-library-statically
LIBS += -l:libcryptopp.a
LIBS += -L$$CRYPTOPP_PREFIX
}
}
simplecrypt {
# ...however, if you're exchanging clipbaord data
# between machines on an isolated network, or you
# aren't paranoid enough to use a heavier crypto
# solution like AES, then SimpleCrypt's obfuscation
# would likely be just fine for you. This is only
# useful for desktop systems (see 'obfuscate' below).
DEFINES += USE_ENCRYPTION
DEFINES += SIMPLECRYPT
SOURCES += SimpleCrypt.cpp
HEADERS += SimpleCrypt.h
}
obfuscate {
# I could not get industrial strength crypto to
# function properly across platforms (PC <-> Mobile)
# because I just don't fully understand the
# nuances, and SimpleCrypt is only useful between
# Qt-based systems, so I fell back to using a
# home-grown obfuscation algorithm that functions
# correctly on all platforms and languages
DEFINES += USE_ENCRYPTION
DEFINES += OBFUSCATION
}
INTERMEDIATE_NAME = intermediate
MOC_DIR = $$INTERMEDIATE_NAME/moc
OBJECTS_DIR = $$INTERMEDIATE_NAME/obj
RCC_DIR = $$INTERMEDIATE_NAME/rcc
UI_DIR = $$INTERMEDIATE_NAME/ui
win32:RC_FILE = ClipNet.rc
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target