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
|
From 0ea6cc5c5605b75a7c88e3c738f383e87a0ddd6e Mon Sep 17 00:00:00 2001
From: hashworks <mail@hashworks.net>
Date: Thu, 18 Jun 2020 19:56:29 +0200
Subject: [PATCH] Respect host linker variables
Not doing so can result in problems during build, see [1]
Just for the record, without this patch a build resulted in the following
namcap warnings on Arch Linux:
* ELF file ('usr/bin/prismatik') lacks FULL RELRO, check LDFLAGS
* Unused shared library '/usr/lib/libGL.so.1'
[1] https://bugs.archlinux.org/task/26435
diff --git a/Software/grab/grab.pro b/Software/grab/grab.pro
index bb271042..88b7bd1c 100644
--- a/Software/grab/grab.pro
+++ b/Software/grab/grab.pro
@@ -23,6 +23,10 @@ INCLUDEPATH += ./include \
../math/include \
..
+QMAKE_CFLAGS = $$(CFLAGS)
+QMAKE_CXXFLAGS = $$(CXXFLAGS)
+QMAKE_LFLAGS = $$(LDFLAGS)
+
QMAKE_CXXFLAGS += -std=c++17
CONFIG(clang) {
QMAKE_CXXFLAGS += -stdlib=libc++
diff --git a/Software/hooks/hooks.pro b/Software/hooks/hooks.pro
index 9c53b619..e20ca488 100644
--- a/Software/hooks/hooks.pro
+++ b/Software/hooks/hooks.pro
@@ -15,6 +15,10 @@ include(../build-config.prf)
LIBS += -lshlwapi -ladvapi32 -luser32
+QMAKE_CFLAGS = $$(CFLAGS)
+QMAKE_CXXFLAGS = $$(CXXFLAGS)
+QMAKE_LFLAGS = $$(LDFLAGS)
+
!isEmpty( DIRECTX_SDK_DIR ) {
# This will suppress gcc warnings in DX headers.
CONFIG(gcc) {
diff --git a/Software/libraryinjector/libraryinjector.pro b/Software/libraryinjector/libraryinjector.pro
index e58abd44..62c82a6c 100644
--- a/Software/libraryinjector/libraryinjector.pro
+++ b/Software/libraryinjector/libraryinjector.pro
@@ -12,6 +12,10 @@ TEMPLATE = lib
LIBS += -luuid -lole32 -ladvapi32 -luser32
RC_FILE = ../res/Libs.rc
+QMAKE_CFLAGS = $$(CFLAGS)
+QMAKE_CXXFLAGS = $$(CXXFLAGS)
+QMAKE_LFLAGS = $$(LDFLAGS)
+
include(../build-config.prf)
DEFINES += LIBRARYINJECTOR_LIBRARY
diff --git a/Software/src/src.pro b/Software/src/src.pro
index 66546f49..242c8c19 100644
--- a/Software/src/src.pro
+++ b/Software/src/src.pro
@@ -58,6 +58,10 @@ DEFINES += $${SUPPORTED_GRABBERS}
LIBS += -L../lib -lgrab -lprismatik-math
+QMAKE_CFLAGS = $$(CFLAGS)
+QMAKE_CXXFLAGS = $$(CXXFLAGS)
+QMAKE_LFLAGS = $$(LDFLAGS)
+
CONFIG(gcc):QMAKE_CXXFLAGS += -std=c++11
CONFIG(clang) {
QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
diff --git a/Software/tests/tests.pro b/Software/tests/tests.pro
index 8d736d83..e6c8963e 100644
--- a/Software/tests/tests.pro
+++ b/Software/tests/tests.pro
@@ -14,6 +14,10 @@ CONFIG -= app_bundle
include(../build-config.prf)
+QMAKE_CFLAGS = $$(CFLAGS)
+QMAKE_CXXFLAGS = $$(CXXFLAGS)
+QMAKE_LFLAGS = $$(LDFLAGS)
+
CONFIG(gcc):QMAKE_CXXFLAGS += -std=c++11
CONFIG(clang) {
QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++
--
2.27.0
|