]> SALOME platform Git repositories - modules/shaper.git/blob - src/SketchPlugin/CMakeLists.txt
Salome HOME
Unit tests for B-splines in the sketcher.
[modules/shaper.git] / src / SketchPlugin / CMakeLists.txt
1 # Copyright (C) 2014-2019  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(Common)
21 INCLUDE(UnitTest)
22
23 SET(PROJECT_HEADERS
24     SketchPlugin.h
25     SketchPlugin_Arc.h
26     SketchPlugin_BSpline.h
27     SketchPlugin_BSplineWidget.h
28     SketchPlugin_Circle.h
29     SketchPlugin_Constraint.h
30     SketchPlugin_ConstraintAngle.h
31     SketchPlugin_ConstraintBase.h
32     SketchPlugin_ConstraintCoincidence.h
33     SketchPlugin_ConstraintCoincidenceInternal.h
34     SketchPlugin_ConstraintCollinear.h
35     SketchPlugin_ConstraintDistance.h
36     SketchPlugin_ConstraintDistanceAlongDir.h
37     SketchPlugin_ConstraintDistanceHorizontal.h
38     SketchPlugin_ConstraintDistanceVertical.h
39     SketchPlugin_ConstraintEqual.h
40     SketchPlugin_Fillet.h
41     SketchPlugin_ConstraintHorizontal.h
42     SketchPlugin_ConstraintLength.h
43     SketchPlugin_ConstraintMiddle.h
44     SketchPlugin_ConstraintMirror.h
45     SketchPlugin_ConstraintParallel.h
46     SketchPlugin_ConstraintPerpendicular.h
47     SketchPlugin_ConstraintRadius.h
48     SketchPlugin_ConstraintRigid.h
49     SketchPlugin_ConstraintTangent.h
50     SketchPlugin_ConstraintVertical.h
51     SketchPlugin_Ellipse.h
52     SketchPlugin_EllipticArc.h
53     SketchPlugin_ExternalValidator.h
54     SketchPlugin_Feature.h
55     SketchPlugin_IntersectionPoint.h
56     SketchPlugin_Line.h
57     SketchPlugin_MacroArc.h
58     SketchPlugin_MacroArcReentrantMessage.h
59     SketchPlugin_MacroBSpline.h
60     SketchPlugin_MacroCircle.h
61     SketchPlugin_MacroEllipse.h
62     SketchPlugin_MacroEllipticArc.h
63     SketchPlugin_MultiRotation.h
64     SketchPlugin_MultiTranslation.h
65     SketchPlugin_Plugin.h
66     SketchPlugin_Point.h
67     SketchPlugin_Projection.h
68     SketchPlugin_Sketch.h
69     SketchPlugin_SketchDrawer.h
70     SketchPlugin_SketchEntity.h
71     SketchPlugin_Split.h
72     SketchPlugin_Tools.h
73     SketchPlugin_Trim.h
74     SketchPlugin_Validators.h
75     SketchPlugin_WidgetCreator.h
76 )
77
78 SET(PROJECT_MOC_HEADERS
79     SketchPlugin_BSplineWidget.h
80 )
81
82 SET(PROJECT_SOURCES
83     SketchPlugin_Arc.cpp
84     SketchPlugin_BSpline.cpp
85     SketchPlugin_BSplineWidget.cpp
86     SketchPlugin_Circle.cpp
87     SketchPlugin_Constraint.cpp
88     SketchPlugin_ConstraintAngle.cpp
89     SketchPlugin_ConstraintCoincidence.cpp
90     SketchPlugin_ConstraintCoincidenceInternal.cpp
91     SketchPlugin_ConstraintCollinear.cpp
92     SketchPlugin_ConstraintDistance.cpp
93     SketchPlugin_ConstraintDistanceAlongDir.cpp
94     SketchPlugin_ConstraintDistanceHorizontal.cpp
95     SketchPlugin_ConstraintDistanceVertical.cpp
96     SketchPlugin_ConstraintEqual.cpp
97     SketchPlugin_Fillet.cpp
98     SketchPlugin_ConstraintHorizontal.cpp
99     SketchPlugin_ConstraintLength.cpp
100     SketchPlugin_ConstraintMiddle.cpp
101     SketchPlugin_ConstraintMirror.cpp
102     SketchPlugin_ConstraintParallel.cpp
103     SketchPlugin_ConstraintPerpendicular.cpp
104     SketchPlugin_ConstraintRadius.cpp
105     SketchPlugin_ConstraintRigid.cpp
106     SketchPlugin_ConstraintTangent.cpp
107     SketchPlugin_ConstraintVertical.cpp
108     SketchPlugin_Ellipse.cpp
109     SketchPlugin_EllipticArc.cpp
110     SketchPlugin_ExternalValidator.cpp
111     SketchPlugin_Feature.cpp
112     SketchPlugin_IntersectionPoint.cpp
113     SketchPlugin_Line.cpp
114     SketchPlugin_MacroArc.cpp
115     SketchPlugin_MacroBSpline.cpp
116     SketchPlugin_MacroCircle.cpp
117     SketchPlugin_MacroEllipse.cpp
118     SketchPlugin_MacroEllipticArc.cpp
119     SketchPlugin_MultiRotation.cpp
120     SketchPlugin_MultiTranslation.cpp
121     SketchPlugin_Plugin.cpp
122     SketchPlugin_Point.cpp
123     SketchPlugin_Projection.cpp
124     SketchPlugin_Sketch.cpp
125     SketchPlugin_SketchDrawer.cpp
126     SketchPlugin_SketchEntity.cpp
127     SketchPlugin_Split.cpp
128     SketchPlugin_Tools.cpp
129     SketchPlugin_Trim.cpp
130     SketchPlugin_Validators.cpp
131     SketchPlugin_WidgetCreator.cpp
132 )
133
134 SET(PROJECT_LIBRARIES
135     Config
136     GeomAPI
137     GeomAlgoAPI
138     ModelAPI
139     ModelGeomAlgo
140     ModuleBase
141     SketcherPrs
142     GeomDataAPI
143 )
144
145 SET(XML_RESOURCES
146   plugin-Sketch.xml
147   plugin-SketchDrawer.xml
148 )
149
150 SET(TEXT_RESOURCES
151     SketchPlugin_msg_en.ts
152     SketchPlugin_msg_fr.ts
153 )
154
155 # sources / moc wrappings
156 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
157
158 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
159 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
160
161 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
162 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES} ${PROJECT_AUTOMOC})
163 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
164
165 INCLUDE_DIRECTORIES(
166   ../Config
167   ../Events
168   ../ModelAPI
169   ../ModelGeomAlgo
170   ../ModuleBase
171   ../GeomAPI
172   ../GeomAlgoAPI
173   ../GeomDataAPI
174   ../SketcherPrs
175   ${OpenCASCADE_INCLUDE_DIR}
176 )
177
178 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
179 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
180 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
181 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
182
183 ADD_UNIT_TESTS(
184   Test1061.py
185   Test1577.py
186   Test1578.py
187   Test1673.py
188   Test1779.py
189   Test1924.py
190   Test1963.py
191   Test1966.py
192   Test1967.py
193   Test2034_1.py
194   Test2034_2.py
195   Test2034_3.py
196   Test2062.py
197   Test2095.py
198   Test2115.py
199   Test2119.py
200   Test2134.py
201   Test2157.py
202   Test2157_2.py
203   Test2224.py
204   Test2229.py
205   Test2239.py
206   Test2273.py
207   Test2280.py
208   Test2287.py
209   Test2341.py
210   Test2376.py
211   Test2390.py
212   Test2393.py
213   Test2425.py
214   Test2427.py
215   Test2440.py
216   Test2481.py
217   Test2654.py
218   Test2711.py
219   Test2741.py
220   Test2810.py
221   Test2824.py
222   Test2860.py
223   Test2894.py
224   Test3019.py
225   Test3087_1.py
226   Test3087_2.py
227   TestArcBehavior.py
228   TestChangeSketchPlane1.py
229   TestChangeSketchPlane2.py
230   TestChangeSketchPlane3.py
231   TestChangeSketchPlane4.py
232   TestConstraintAngle.py
233   TestConstraintAngle_v0_1.py
234   TestConstraintAngle_v0_2.py
235   TestConstraintAngle_v20191210_1.py
236   TestConstraintAngle_v20191210_2.py
237   TestConstraintAngleBehaviorDirect.py
238   TestConstraintAngleBehaviorSupplementary_1.py
239   TestConstraintAngleBehaviorSupplementary_2.py
240   TestConstraintAngleBehaviorBackward_1.py
241   TestConstraintAngleBehaviorBackward_2.py
242   TestConstraintAngleEllipse.py
243   TestConstraintCoincidence.py
244   TestConstraintCoincidenceEllipse.py
245   TestConstraintCoincidenceEllipticArc.py
246   TestConstraintCollinear.py
247   TestConstraintCollinearEllipse.py
248   TestConstraintDistance.py
249   TestConstraintDistanceEllipse.py
250   TestConstraintDistanceBehavior.py
251   TestConstraintDistanceHorizontal.py
252   TestConstraintDistanceVertical.py
253   TestConstraintDistanceZero.py
254   TestConstraintDistanceHorizontalZero.py
255   TestConstraintDistanceVerticalZero.py
256   TestConstraintEqual.py
257   TestConstraintEqualEllipse.py
258   TestConstraintFixed.py
259   TestConstraintHorizontal.py
260   TestConstraintHorizontalValidator.py
261   TestConstraintLength.py
262   TestConstraintMiddlePoint.py
263   TestConstraintMiddlePointOnArc.py
264   TestConstraintMiddlePointOnEllipticArc.py
265   TestConstraintParallel.py
266   TestConstraintPerpendicular.py
267   TestConstraintPerpendicularArcLine.py
268   TestConstraintPerpendicularEllipseLine.py
269   TestConstraintRadius.py
270   TestConstraintRadiusFailure.py
271   TestConstraintTangent.py
272   TestConstraintTangentEllipse.py
273   TestConstraintTangentEllipticArc.py
274   TestConstraintVertical.py
275   TestCreateArcByCenterStartEnd.py
276   TestCreateArcByTangentEdge.py
277   TestCreateArcByThreePoints.py
278   TestCreateArcByTransversalLine.py
279   TestCreateArcChangeType.py
280   TestCreateBSpline.py
281   TestCreateCircleByCenterAndPassed.py
282   TestCreateCircleByThreePoints.py
283   TestCreateCircleChangeType.py
284   TestCreateEllipseByCenterSemiaxisAndPassed.py
285   TestCreateEllipseByMajorAxisAndPassed.py
286   TestCreateEllipseByExternal.py
287   TestCreateEllipticArc.py
288   TestCreateEllipticArcByExternal.py
289   TestDegeneratedGeometry.py
290   TestDistanceDump.py
291   TestDistanceSignedVsUnsigned01.py
292   TestDistanceSignedVsUnsigned02.py
293   TestDistanceSignedVsUnsigned03.py
294   TestDistanceSignedVsUnsigned04.py
295   TestDistanceSignedVsUnsigned05.py
296   TestEdgesOrder.py
297   TestFillet.py
298   TestFilletAfterFolder.py
299   TestFilletInteracting.py
300   TestHighload.py
301   TestIntersectionChangeEdge.py
302   TestIntersectionWithCircle.py
303   TestIntersectionWithLine.py
304   TestIntersectionWithSpline.py
305   TestMirror.py
306   TestMultiRotation.py
307   TestMultiRotation01.py
308   TestMultiRotation02.py
309   TestMultiRotation03.py
310   TestMultiRotation04.py
311   TestMultiRotation05.py
312   TestMultiRotationWithParameter.py
313   TestMultiTranslation.py
314   TestPresentation.py
315   TestProjection.py
316   TestProjectionBSpline.py
317   TestProjectionEllipse.py
318   TestProjectionEllipticArc.py
319   TestProjectionIntoResult.py
320   TestProjectionUpdate.py
321   TestRectangle.py
322   TestRemainingDoF.py
323   TestRemoveBSpline.py
324   TestRemoveEllipse.py
325   TestRemoveEllipticArc.py
326   TestRemoveSketch.py
327   TestSignedDistancePointLine.py
328   TestSignedDistancePointPoint.py
329   TestSketchDrawer.py
330   TestSketchPointLine.py
331   TestSnowflake.py
332   TestSplit.py
333   TestSplitEllipse.py
334   TestSplitLine.py
335   TestSplitPreview.py
336   TestTrimArc01.py
337   TestTrimArc02.py
338   TestTrimArc03.py
339   TestTrimArc04.py
340   TestTrimArc05.py
341   TestTrimArc06.py
342   TestTrimArc07.py
343   TestTrimArc08.py
344   TestTrimCircle01.py
345   TestTrimCircle02.py
346   TestTrimCircle03.py
347   TestTrimCircle04.py
348   TestTrimCircle05.py
349   TestTrimCircleAndArc01.py
350   TestTrimEllipse.py
351   TestTrimLine01.py
352   TestTrimLine02.py
353   TestTrimLine03.py
354   TestTrimPreview.py
355   TestUpdateSketch.py
356 )
357
358 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
359   ADD_UNIT_TESTS(
360     TestMoveArc.py
361     TestMoveBSpline.py
362     TestMoveCircle.py
363     TestMoveEllipse.py
364     TestMoveEllipticArc.py
365     TestMoveLine.py
366     TestMovementComplex.py
367     TestMovePoint.py
368   )
369 endif()