/
CMakeLists.txt
executable file
·219 lines (195 loc) · 4.8 KB
/
CMakeLists.txt
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
if(MSVC)
add_definitions(-DFCAppFem -DHAVE_ACOSH -DHAVE_ASINH -DHAVE_ATANH)
else(MSVC)
add_definitions(-DHAVE_LIMITS_H -DHAVE_CONFIG_H)
endif(MSVC)
if(BUILD_FEM_NETGEN)
add_definitions(-DFCWithNetgen)
endif(BUILD_FEM_NETGEN)
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src
${CMAKE_BINARY_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_SOURCE_DIR}/src/3rdParty/ANN/include
${Boost_INCLUDE_DIRS}
${QT_INCLUDE_DIR}
${OCC_INCLUDE_DIR}
${PYTHON_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
${XercesC_INCLUDE_DIRS}
${SMESH_INCLUDE_DIR}
)
link_directories(${OCC_LIBRARY_DIR})
if(BUILD_FEM_NETGEN)
set(Fem_LIBS
Part
FreeCADApp
StdMeshers
NETGENPlugin
SMESH
SMDS
SMESHDS
)
else(BUILD_FEM_NETGEN)
set(Fem_LIBS
Part
FreeCADApp
StdMeshers
SMESH
SMDS
SMESHDS
)
endif(BUILD_FEM_NETGEN)
generate_from_xml(FemMeshPy)
SET(Python_SRCS
FemMeshPy.xml
FemMeshPyImp.cpp
HypothesisPy.cpp
HypothesisPy.h
)
SOURCE_GROUP("Python" FILES ${Python_SRCS})
SET(Mod_SRCS
AppFem.cpp
AppFemPy.cpp
FemTools.cpp
FemTools.h
PreCompiled.cpp
PreCompiled.h
)
SOURCE_GROUP("Module" FILES ${Mod_SRCS})
SET(FemScripts_SRCS
_CommandFemBeamSection.py
_CommandFemFromShape.py
_CommandFemShellThickness.py
_CommandFemSolverCalculix.py
_CommandMechanicalMaterial.py
_CommandMechanicalShowResult.py
_CommandNewMechanicalAnalysis.py
_CommandPurgeFemResults.py
_CommandQuickAnalysis.py
_CommandSolverJobControl.py
_FemAnalysis.py
_FemBeamSection.py
_FemShellThickness.py
_FemSolverCalculix.py
_MechanicalMaterial.py
_TaskPanelFemBeamSection.py
_TaskPanelFemShellThickness.py
_TaskPanelFemSolverCalculix.py
_TaskPanelMechanicalMaterial.py
_TaskPanelResultControl.py
_ViewProviderFemAnalysis.py
_ViewProviderFemBeamSection.py
_ViewProviderFemShellThickness.py
_ViewProviderFemSolverCalculix.py
_ViewProviderMechanicalMaterial.py
ccxDatReader.py
ccxFrdReader.py
ccxInpWriter.py
convert2TetGen.py
Init.py
InitGui.py
FemCommands.py
FemBeamSection.py
FemExample.py
FemShellThickness.py
FemSolverCalculix.py
FemTools.py
MechanicalAnalysis.py
MechanicalMaterial.py
SelectionObserverFem.py
TestFem.py
TaskPanelFemBeamSection.ui
TaskPanelFemShellThickness.ui
TaskPanelFemSolverCalculix.ui
TaskPanelMechanicalMaterial.ui
TaskPanelShowDisplacement.ui
)
#SOURCE_GROUP("Scripts" FILES ${FemScripts_SRCS})
SET(FemTests_SRCS
test_files/ccx/mesh_points.csv
test_files/ccx/mesh_volumes.csv
test_files/ccx/static_analysis.inp
test_files/ccx/frequency_analysis.inp
test_files/ccx/cube_frequency.inp
test_files/ccx/cube_frequency.dat
test_files/ccx/cube_frequency.frd
test_files/ccx/cube_frequency_expected_values
test_files/ccx/cube_static.inp
test_files/ccx/cube_static.dat
test_files/ccx/cube_static.frd
test_files/ccx/cube_static_expected_values
)
SET(FemBase_SRCS
FemMeshObject.cpp
FemMeshObject.h
FemMeshShapeObject.cpp
FemMeshShapeObject.h
FemMeshShapeNetgenObject.cpp
FemMeshShapeNetgenObject.h
FemAnalysis.cpp
FemAnalysis.h
FemMesh.cpp
FemMesh.h
FemResultObject.cpp
FemResultObject.h
FemSolverObject.cpp
FemSolverObject.h
FemConstraint.cpp
FemConstraint.h
FemMeshProperty.cpp
FemMeshProperty.h
)
SOURCE_GROUP("Base types" FILES ${FemBase_SRCS})
SET(FemSet_SRCS
FemSetObject.cpp
FemSetObject.h
FemSetNodesObject.cpp
FemSetNodesObject.h
FemSetElementsObject.cpp
FemSetElementsObject.h
FemSetFacesObject.cpp
FemSetFacesObject.h
FemSetGeometryObject.cpp
FemSetGeometryObject.h
)
SOURCE_GROUP("Set objects" FILES ${FemSet_SRCS})
SET(FemConstraints_SRCS
FemConstraintBearing.h
FemConstraintBearing.cpp
FemConstraintFixed.cpp
FemConstraintFixed.h
FemConstraintForce.cpp
FemConstraintForce.h
FemConstraintPressure.cpp
FemConstraintPressure.h
FemConstraintGear.cpp
FemConstraintGear.h
FemConstraintPulley.cpp
FemConstraintPulley.h
)
SOURCE_GROUP("Constraints" FILES ${FemConstraints_SRCS})
SET(FemResult_SRCS
)
SOURCE_GROUP("ResultObjects" FILES ${FemResult_SRCS})
SET(Fem_SRCS
${FemBase_SRCS}
${FemSet_SRCS}
${FemConstraints_SRCS}
${FemResult_SRCS}
${Mod_SRCS}
${Python_SRCS}
)
add_library(Fem SHARED ${Fem_SRCS})
target_link_libraries(Fem ${Fem_LIBS})
fc_target_copy_resource(Fem
${CMAKE_SOURCE_DIR}/src/Mod/Fem
${CMAKE_BINARY_DIR}/Mod/Fem
Init.py
${FemScripts_SRCS}
${FemTests_SRCS}
)
SET_BIN_DIR(Fem Fem /Mod/Fem)
SET_PYTHON_PREFIX_SUFFIX(Fem)
INSTALL(TARGETS Fem DESTINATION ${CMAKE_INSTALL_LIBDIR})