forked from simulationcraft/simc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
simulationcraft.pri
135 lines (108 loc) · 3.09 KB
/
simulationcraft.pri
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
ORG_NAME = SimulationCraft
APP_NAME = SimulationCraft
INCLUDEPATH = ../engine
INCLUDEPATH += ../engine/util
DEPENDPATH = ../engine
VPATH = ..
CONFIG += c++14
CONFIG(debug, debug|release): OBJECTS_DIR = build/debug
CONFIG(release, debug|release): OBJECTS_DIR = build/release
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
isEmpty(SC_NO_NETWORKING) {
SC_NO_NETWORKING=$$(SC_NO_NETWORKING)
}
# Setup some paths if DESTDIR/PREFIX are defined for Linux stuff
unix:!macx {
!isEmpty(DESTDIR): PREFIX=$$DESTDIR/$$PREFIX
isEmpty(PREFIX): PREFIX=/usr/local
isEmpty(DATADIR): DATADIR=$$PREFIX/share
isEmpty(SEARCH): SEARCH=$$DATADIR/$$ORG_NAME/$$APP_NAME
isEmpty(BINDIR): BINDIR=$$PREFIX/bin
SHAREPATH = $$DESTDIR$$PREFIX/share/$$ORG_NAME/$$APP_NAME
}
CONFIG(release, debug|release) {
DEFINES += NDEBUG
}
CONFIG(openssl) {
DEFINES += SC_USE_OPENSSL
!isEmpty(OPENSSL_INCLUDES) {
INCLUDEPATH += $$OPENSSL_INCLUDES
}
!isEmpty(OPENSSL_LIBS) {
LIBS += -L$$OPENSSL_LIBS
}
win32 {
LIBS += -lssleay32
}
}
!isEmpty(SC_NO_NETWORKING) {
DEFINES += SC_NO_NETWORKING
message(Building without networking support)
}
contains(QMAKE_CXX, .+/clang\+\+)|contains(QMAKE_CXX, .+/g\+\+) {
QMAKE_CXXFLAGS += -Wextra
QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math -fomit-frame-pointer -Os -fPIE
!isEmpty(LTO) {
QMAKE_CXXFLAGS_RELEASE += -flto
}
}
unix|macx {
exists(.git):system(which -s git) {
DEFINES += SC_GIT_REV="\\\"$$system(git rev-parse --short HEAD)\\\""
}
}
macx {
contains(QMAKE_CXX, .+/clang\+\+) {
QMAKE_CXXFLAGS += -Wno-inconsistent-missing-override
}
CONFIG(sanitize) {
QMAKE_CXXFLAGS += -fsanitize=address
QMAKE_LFLAGS += -fsanitize=address
}
}
win32 {
LIBS += -lshell32
win32-msvc {
QMAKE_CXXFLAGS_RELEASE += /O2 /MP /GL
QMAKE_CXXFLAGS_WARN_ON += /w44800 /w44100 /w44065
}
win32-msvc2017 {
QMAKE_CXXFLAGS += /permissive-
}
# TODO: Mingw might want something more unixy here?
exists(.git):system(where /q git) {
DEFINES += SC_GIT_REV="\\\"$$system(git rev-parse --short HEAD)\\\""
}
!isEmpty(PGO) {
win32-msvc2013 {
QMAKE_LFLAGS_RELEASE += /LTCG
QMAKE_CXXFLAGS_RELEASE += /GL
}
win32-msvc2015 {
QMAKE_CXXFLAGS_RELEASE += /GL
QMAKE_LFLAGS_RELEASE += /LTCG /USEPROFILE /PGD:"..\SimulationCraft.pgd"
}
}
}
# Curl is now required for everything, on unixy systems use pkg-config to find it, on Windows,
# require CURL_ROOT to be defined (in an environment variable or compilation definition) and
# pointing to the base curl directory (dll found in CURL_ROOT/bin, includes in CURL_ROOT/include)
!win32 {
isEmpty(SC_NO_NETWORKING) {
CONFIG += link_pkgconfig
PKGCONFIG += libcurl
}
}
win32 {
isEmpty(SC_NO_NETWORKING) {
isEmpty(CURL_ROOT) {
CURL_ROOT = $$(CURL_ROOT)
}
isEmpty(CURL_ROOT) {
error(Libcurl (https://curl.haxx.se) windows libraries must be built and output base directory set in CURL_ROOT)
}
INCLUDEPATH += "$$CURL_ROOT/include"
LIBS += "$$CURL_ROOT/lib/libcurl.lib"
}
}