forked from fougue/mayo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmayo.pro
224 lines (198 loc) · 5.12 KB
/
mayo.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#****************************************************************************
#* Copyright (c) 2021, Fougue Ltd. <http://www.fougue.pro>
#* All rights reserved.
#* See license at https://github.com/fougue/mayo/blob/master/LICENSE.txt
#****************************************************************************
TEMPLATE = app
TARGET = mayo
include(version.pri)
CONFIG(debug, debug|release) {
message(Mayo version $$MAYO_VERSION debug)
} else {
message(Mayo version $$MAYO_VERSION release)
}
message(Qt version $$QT_VERSION)
QT += core gui widgets
greaterThan(QT_MAJOR_VERSION, 5) {
QT += openglwidgets
}
CONFIG += c++17
CONFIG(debug, debug|release) {
CONFIG += console
} else {
CONFIG -= console
CONFIG += release_with_debuginfo
}
DEFINES += \
QT_DISABLE_DEPRECATED_BEFORE=0x050F00 \
QT_IMPLICIT_QFILEINFO_CONSTRUCTION \
release_with_debuginfo:msvc {
# https://docs.microsoft.com/en-us/cpp/build/reference/how-to-debug-a-release-build
QMAKE_CXXFLAGS_RELEASE += /Zi
QMAKE_LFLAGS_RELEASE += /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF
}
msvc {
DEFINES += NOMINMAX
QMAKE_CXXFLAGS += /we4150 # Deletion of pointer to incomplete type 'XXXX'; no destructor called
QMAKE_CXXFLAGS += /std:c++17
greaterThan(QT_MAJOR_VERSION, 5) {
DEFINES += _USE_MATH_DEFINES
}
}
gcc|clang {
QMAKE_CXXFLAGS += -std=c++17
}
clang {
# Silent Clang warnings about instantiation of variable 'Mayo::GenericProperty<T>::TypeName'
QMAKE_CXXFLAGS += -Wno-undefined-var-template
# See https://libcxx.llvm.org/docs/UsingLibcxx.html
# LIBS += -lstdc++fs
}
macx {
DEFINES += GL_SILENCE_DEPRECATION
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15
LIBS += -liconv
# QMAKE_CXXFLAGS += -mmacosx-version-min=10.15
}
win32 {
LIBS += -lOpengl32 -lUser32
}
INCLUDEPATH += \
src/app \
src/3rdparty
HEADERS += \
$$files(src/base/*.h) \
$$files(src/io_dxf/*.h) \
$$files(src/io_image/*.h) \
$$files(src/io_occ/*.h) \
$$files(src/io_off/*.h) \
$$files(src/io_ply/*.h) \
$$files(src/graphics/*.h) \
$$files(src/gui/*.h) \
$$files(src/measure/*.h) \
$$files(src/app/*.h) \
SOURCES += \
$$files(src/base/*.cpp) \
$$files(src/io_dxf/*.cpp) \
$$files(src/io_image/*.cpp) \
$$files(src/io_occ/*.cpp) \
$$files(src/io_off/*.cpp) \
$$files(src/io_ply/*.cpp) \
$$files(src/graphics/*.cpp) \
$$files(src/gui/*.cpp) \
$$files(src/measure/*.cpp) \
$$files(src/app/*.cpp) \
\
src/3rdparty/fmt/src/format.cc \
win32:lessThan(QT_MAJOR_VERSION, 6) {
QT += winextras
HEADERS += $$files(src/app/windows/*.h)
SOURCES += $$files(src/app/windows/*.cpp)
}
FORMS += $$files(src/app/*.ui)
RESOURCES += mayo.qrc
RC_ICONS = images/appicon.ico
OTHER_FILES += \
README.md \
appveyor.yml \
.github/workflows/ci.yml \
images/credits.txt \
scripts/bump-version.rb \
# OpenCascade
include(opencascade.pri)
!isEmpty(OCC_VERSION_STR) {
message(OpenCascade version $$OCC_VERSION_STR)
} else {
warning(OpenCascade version <unknown>)
}
LIBS += \
-lTKBin \
-lTKBinL \
-lTKBinXCAF \
-lTKBO \
-lTKBool \
-lTKBRep \
-lTKCAF \
-lTKCDF \
-lTKernel \
-lTKG2d \
-lTKG3d \
-lTKGeomAlgo \
-lTKGeomBase \
-lTKHLR \
-lTKLCAF \
-lTKMath \
-lTKMesh \
-lTKMeshVS \
-lTKOpenGl \
-lTKPrim \
-lTKService \
-lTKShHealing \
-lTKTopAlgo \
-lTKXSDRAW \ # Seems to be required on macOS(see https://github.com/fougue/mayo/issues/41#issuecomment-742732322)
-lTKV3d \
-lTKVCAF \
-lTKXCAF \
-lTKXml \
-lTKXmlL \
-lTKXmlXCAF \
-lTKXSBase \
minOpenCascadeVersion(7, 7, 0) {
LIBS += -lTKXDE
}
# -- IGES support
LIBS += -lTKIGES -lTKXDEIGES
# -- STEP support
LIBS += -lTKSTEP -lTKSTEP209 -lTKSTEPAttr -lTKSTEPBase -lTKXDESTEP
# -- STL support
LIBS += -lTKSTL
# -- OBJ/glTF support
minOpenCascadeVersion(7, 4, 0) {
LIBS += -lTKRWMesh
} else {
SOURCES -= \
src/io_occ/io_occ_base_mesh.cpp \
src/io_occ/io_occ_gltf_reader.cpp \
src/io_occ/io_occ_obj_reader.cpp
}
!minOpenCascadeVersion(7, 5, 0) {
SOURCES -= src/io_occ/io_occ_gltf_writer.cpp
}
!minOpenCascadeVersion(7, 6, 0) {
SOURCES -= src/io_occ/io_occ_obj_writer.cpp
}
# -- VRML support
LIBS += -lTKVRML
!minOpenCascadeVersion(7, 7, 0) {
SOURCES -= src/io_occ/io_occ_vrml_reader.cpp
}
# gmio
isEmpty(GMIO_ROOT) {
message(gmio OFF)
} else {
message(gmio ON)
CONFIG(debug, debug|release) {
#GMIO_BIN_SUFFIX = d
GMIO_BIN_SUFFIX =
} else {
GMIO_BIN_SUFFIX =
}
HEADERS += $$files(src/io_gmio/*.h)
SOURCES += $$files(src/io_gmio/*.cpp)
INCLUDEPATH += $$GMIO_ROOT/include
LIBS += -L$$GMIO_ROOT/lib -lgmio_static -lzlibstatic
SOURCES += \
# $$GMIO_ROOT/src/gmio_support/stl_occ_brep.cpp \
# $$GMIO_ROOT/src/gmio_support/stl_occ_polytri.cpp \
$$GMIO_ROOT/src/gmio_support/stream_qt.cpp
DEFINES += HAVE_GMIO
}
# Unit tests
CONFIG(withtests) {
include(tests/tests.pri)
DEFINES += MAYO_WITH_TESTS
}
# Developer custom processing
exists($$PWD/custom.pri) {
include($$PWD/custom.pri)
}