-
Notifications
You must be signed in to change notification settings - Fork 1
/
GraphViz.pro
58 lines (47 loc) · 1.29 KB
/
GraphViz.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
QT += widgets
# Make sure we do not accidentally #include files placed in 'res'
CONFIG += no_include_pwd
CONFIG += console
CONFIG -= app_bundle
SOURCES += $$PWD/src/*.cpp
SOURCES += $$PWD/src/*.h
HEADERS += $$PWD/src/*.h
# set up flags for the compiler and Stanford C++ libraries
QMAKE_CXXFLAGS += -std=c++11 \
-Wall \
-Wextra \
-Wreturn-type \
-Werror=return-type \
-Wunreachable-code \
# Copies the given files to the destination directory
# The rest of this file defines how to copy the resources folder
defineTest(copyToDestdir) {
files = $$1
for(FILE, files) {
DDIR = $$OUT_PWD
# Replace slashes in paths with backslashes for Windows
win32:FILE ~= s,/,\\,g
win32:DDIR ~= s,/,\\,g
!win32 {
copyResources.commands += cp -r '"'$$FILE'"' '"'$$DDIR'"' $$escape_expand(\\n\\t)
}
win32 {
copyResources.commands += xcopy '"'$$FILE'"' '"'$$DDIR'"' /e /y $$escape_expand(\\n\\t)
}
}
export(copyResources.commands)
}
!win32 {
copyToDestdir($$files($$PWD/res/*))
}
win32 {
copyToDestdir($$PWD/res)
}
copyResources.input = $$files($$PWD/res/*)
OTHER_FILES = $$files(res/*)
QMAKE_EXTRA_TARGETS += copyResources
POST_TARGETDEPS += copyResources
macx {
cache()
QMAKE_MAC_SDK = macosx
}