forked from LibreCAD/LibreCAD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.pro
84 lines (68 loc) · 2.05 KB
/
common.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
# Store intermedia stuff somewhere else
isEmpty(GENERATED_DIR){
GENERATED_DIR = generated
}
# Store intermedia stuff somewhere else
OBJECTS_DIR = $${GENERATED_DIR}/obj
MOC_DIR = $${GENERATED_DIR}/moc
RCC_DIR = $${GENERATED_DIR}/rcc
UI_DIR = $${GENERATED_DIR}/ui
UI_HEADERS_DIR = $${GENERATED_DIR}/ui
UI_SOURCES_DIR = $${GENERATED_DIR}/ui
# Copy command
win32 {
COPY = copy /y
} else {
COPY = cp
}
# Boost
exists($${BOOST_DIR}){
INCLUDEPATH += "$${BOOST_DIR}"
LIBS += -L"$${BOOST_LIBDIR}" $${BOOST_LIBS}
HEADERS += "$${BOOST_DIR}"
}
!exists($${BOOST_DIR}) {
# error(Boost was not found, please install boost!)
}
message(Using boost libraries in $${BOOST_DIR}.)
# muParser
# ********
exists($${MUPARSER_DIR}){
INCLUDEPATH += "$${MUPARSER_DIR}"/include
LIBS += -L"$${MUPARSER_DIR}"/lib
}else{
message("muParser was not found, please install muParser!")
}
message("Using muParser libraries in $${MUPARSER_DIR}.")
# Windows compiler settings
win32 {
QMAKE_CXXFLAGS += -U__STRICT_ANSI__
QMAKE_CFLAGS_THREAD -= -mthreads
QMAKE_LFLAGS_THREAD -= -mthreads
QMAKE_C++FLAGS_THREAD -= -mthreads
QMAKE_L++FLAGS_THREAD -= -mthreads
#qt version check for mingw
win32-g++ {
contains(QT_VERSION, ^4\\.8\\.[0-1]) {
DEFINES += QT_NO_CONCURRENT=0
}
}
# On windows, check for MSVC compilers - they need help on C99
# features and a hint to povide M_PI et al.
win32-msvc.net|win32-msvc2003|win32-msvc2005|win32-msvc2008|win32-msvc2010 {
!build_pass:verbose:message(Setting up support for MSVC.)
DEFINES += EMU_C99 _USE_MATH_DEFINES
}
# The .NET 2003 compiler (at least) is touchy about its own headers ...
win32-msvc2003 {
# Silence "unused formal parameter" warnings about unused `_Iosbase`
# in the header file `xloctime` (a Vc7 header after all!).
QMAKE_CXXFLAGS += /wd4100
}
}
# c++11 is now obligatory for LibreCAD
message(We will be using CPP11 features)
QMAKE_CXXFLAGS_DEBUG += -std=c++0x
QMAKE_CXXFLAGS += -std=c++0x
# svg support
QT += svg