-
Notifications
You must be signed in to change notification settings - Fork 2
/
djog_unos_2018.pro
140 lines (112 loc) · 3.26 KB
/
djog_unos_2018.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
include(djog_unos_2018.pri)
# Entry point for user
SOURCES += main.cpp
# C++17
CONFIG += c++17
QMAKE_CXXFLAGS += -std=c++17
CONFIG += resources_big
# High warning levels
# SFML goes bad with -Weffc++
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
# Needed this to make std::cout work
# CONFIG += console
# NOTE you need to flush a cout to print it
# seems like std::endl is superior after all
# Debug and release settings
CONFIG += debug_and_release
CONFIG(release, debug|release) {
DEFINES += NDEBUG
DEFINES += SFML_STATIC
# GNU/Linux
unix:!macx {
# gprof
QMAKE_CXXFLAGS += -pg
QMAKE_LFLAGS += -pg
# helgrind, for helgrind and memcheck
QMAKE_LFLAGS += -pthread -Wl,--no-as-needed
}
}
CONFIG(debug, debug|release) {
# GNU/Linux
unix:!macx {
# gcov
g++{
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
LIBS += -lgcov
}
# helgrind, for helgrind and memcheck
QMAKE_LFLAGS += -pthread -Wl,--no-as-needed
# UBSAN
#QMAKE_CXXFLAGS += -fsanitize=undefined
#QMAKE_LFLAGS += -fsanitize=undefined
#LIBS += -lubsan
}
}
# High warning level, warnings are errors
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic
#QMAKE_CXXFLAGS += -Werror
# SFML
# GNU/Linux
unix:!macx {
LIBS += -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
#LIBS += -L"/home/rafayel/SFML/lib"
#INCLUDEPATH += "/home/rafayel/SFML/include"
#DEPENDPATH += "/home/rafayel/SFML/include"
}
win32{
INCLUDEPATH += C:/Qt/sfml/include
LIBS += -LC:/Qt/sfml/lib
CONFIG(release, debug|release):
{
#Audio Related Libs
LIBS += -lsfml-audio
LIBS += -lopenal32 #Dependency
#SFML-Graphics Libs
LIBS += -lsfml-graphics
LIBS += -lfreetype #Dependency
#SFML-Window Libs
LIBS += -lsfml-window
LIBS += -lopengl32 #Dependency
LIBS += -lgdi32 #Dependency
#SFML-System Libs
LIBS += -lsfml-system
LIBS += -lwinmm #Dependency
}
#Debug Configuration
CONFIG(debug, debug|release):
{
#Audio Related Libs
LIBS += -lsfml-audio-d
LIBS += -lopenal32 #Dependency
#SFML-Graphics Libs
LIBS += -lsfml-graphics-d
LIBS += -lfreetype #Dependency
#LIBS += -ljpeg #Dependency
#SFML-Window Libs
LIBS += -lsfml-window-d
LIBS += -lopengl32 #Dependency
LIBS += -lgdi32 #Dependency
#SFML-System Libs
LIBS += -lsfml-system-d
LIBS += -lwinmm #Dependency
}
}
# Qt5
QT += core gui
# QResources give this error
QMAKE_CXXFLAGS += -Wno-unused-variable
# Fixes
#/usr/include/boost/math/constants/constants.hpp:277: error: unable to find numeric literal operator 'operator""Q'
# BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
# ^
g++{
message(Using g++)
QMAKE_CXXFLAGS += -fext-numeric-literals
}
clang{
message(Using clang)
}
# Prevent Qt for failing with this error:
# qrc_[*].cpp:400:44: error: 'qInitResources_[*]__init_variable__' defined but not used
# [*]: the resource filename
QMAKE_CXXFLAGS += -Wno-unused-variable