Salome HOME
Merge branch 'CEA_2021_1'
[modules/shaper.git] / src / SketchPlugin / CMakeLists.txt
1 # Copyright (C) 2014-2020  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_BSplineBase.h
28     SketchPlugin_BSplinePeriodic.h
29     SketchPlugin_Circle.h
30     SketchPlugin_Constraint.h
31     SketchPlugin_ConstraintAngle.h
32     SketchPlugin_ConstraintBase.h
33     SketchPlugin_ConstraintCoincidence.h
34     SketchPlugin_ConstraintCoincidenceInternal.h
35     SketchPlugin_ConstraintCollinear.h
36     SketchPlugin_ConstraintDistance.h
37     SketchPlugin_ConstraintDistanceAlongDir.h
38     SketchPlugin_ConstraintDistanceHorizontal.h
39     SketchPlugin_ConstraintDistanceVertical.h
40     SketchPlugin_ConstraintEqual.h
41     SketchPlugin_Fillet.h
42     SketchPlugin_ConstraintHorizontal.h
43     SketchPlugin_ConstraintLength.h
44     SketchPlugin_ConstraintMiddle.h
45     SketchPlugin_ConstraintMirror.h
46     SketchPlugin_ConstraintParallel.h
47     SketchPlugin_ConstraintPerpendicular.h
48     SketchPlugin_ConstraintRadius.h
49     SketchPlugin_ConstraintRigid.h
50     SketchPlugin_ConstraintTangent.h
51     SketchPlugin_ConstraintVertical.h
52     SketchPlugin_CurveFitting.h
53     SketchPlugin_Ellipse.h
54     SketchPlugin_EllipticArc.h
55     SketchPlugin_ExternalValidator.h
56     SketchPlugin_Feature.h
57     SketchPlugin_IntersectionPoint.h
58     SketchPlugin_Line.h
59     SketchPlugin_MacroArc.h
60     SketchPlugin_MacroArcReentrantMessage.h
61     SketchPlugin_MacroBSpline.h
62     SketchPlugin_MacroCircle.h
63     SketchPlugin_MacroEllipse.h
64     SketchPlugin_MacroEllipticArc.h
65     SketchPlugin_MultiRotation.h
66     SketchPlugin_MultiTranslation.h
67     SketchPlugin_Offset.h
68     SketchPlugin_Plugin.h
69     SketchPlugin_Point.h
70     SketchPlugin_Projection.h
71     SketchPlugin_Sketch.h
72     SketchPlugin_SketchCopy.h
73     SketchPlugin_SketchDrawer.h
74     SketchPlugin_SketchEntity.h
75     SketchPlugin_Split.h
76     SketchPlugin_Tools.h
77     SketchPlugin_Trim.h
78     SketchPlugin_Validators.h
79 )
80
81 SET(PROJECT_SOURCES
82     SketchPlugin_Arc.cpp
83     SketchPlugin_BSpline.cpp
84     SketchPlugin_BSplineBase.cpp
85     SketchPlugin_BSplinePeriodic.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_CurveFitting.cpp
109     SketchPlugin_Ellipse.cpp
110     SketchPlugin_EllipticArc.cpp
111     SketchPlugin_ExternalValidator.cpp
112     SketchPlugin_Feature.cpp
113     SketchPlugin_IntersectionPoint.cpp
114     SketchPlugin_Line.cpp
115     SketchPlugin_MacroArc.cpp
116     SketchPlugin_MacroBSpline.cpp
117     SketchPlugin_MacroCircle.cpp
118     SketchPlugin_MacroEllipse.cpp
119     SketchPlugin_MacroEllipticArc.cpp
120     SketchPlugin_MultiRotation.cpp
121     SketchPlugin_MultiTranslation.cpp
122     SketchPlugin_Offset.cpp
123     SketchPlugin_Plugin.cpp
124     SketchPlugin_Point.cpp
125     SketchPlugin_Projection.cpp
126     SketchPlugin_Sketch.cpp
127     SketchPlugin_SketchCopy.cpp
128     SketchPlugin_SketchDrawer.cpp
129     SketchPlugin_SketchEntity.cpp
130     SketchPlugin_Split.cpp
131     SketchPlugin_Tools.cpp
132     SketchPlugin_Trim.cpp
133     SketchPlugin_Validators.cpp
134 )
135
136 SET(PROJECT_LIBRARIES
137     Config
138     GeomAPI
139     GeomAlgoAPI
140     GeomDataAPI
141     Locale
142     ModelAPI
143     ModelGeomAlgo
144     ModuleBase
145     SketcherPrs
146 )
147
148 SET(XML_RESOURCES
149   plugin-Sketch.xml
150   plugin-SketchCopy.xml
151   plugin-SketchDrawer.xml
152 )
153
154 SET(TEXT_RESOURCES
155     SketchPlugin_msg_en.ts
156     SketchPlugin_msg_fr.ts
157 )
158
159 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
160 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
161 SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
162
163 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
164 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
165 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
166
167 INCLUDE_DIRECTORIES(
168   ../Config
169   ../Events
170   ../Locale
171   ../ModelAPI
172   ../ModelGeomAlgo
173   ../ModuleBase
174   ../GeomAPI
175   ../GeomAlgoAPI
176   ../GeomDataAPI
177   ../SketcherPrs
178   ${OpenCASCADE_INCLUDE_DIR}
179 )
180
181 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
182 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
183 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
184 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
185
186 ADD_UNIT_TESTS(
187   Test1061.py
188   Test1577.py
189   Test1578.py
190   Test1673.py
191   Test1779.py
192   Test1924.py
193   Test1963.py
194   Test1966.py
195   Test1967.py
196   Test2034_1.py
197   Test2034_2.py
198   Test2034_3.py
199   Test2062.py
200   Test2095.py
201   Test2115.py
202   Test2119.py
203   Test2134.py
204   Test2157.py
205   Test2157_2.py
206   Test2224.py
207   Test2229.py
208   Test2239.py
209   Test2273.py
210   Test2280.py
211   Test2287.py
212   Test2341.py
213   Test2376.py
214   Test2390.py
215   Test2393.py
216   Test2425.py
217   Test2427.py
218   Test2440.py
219   Test2481.py
220   Test2654.py
221   Test2711.py
222   Test2741.py
223   Test2810.py
224   Test2824.py
225   Test2860.py
226   Test2894.py
227   Test3019.py
228   Test3087_1.py
229   Test3087_2.py
230   Test3132.py
231   Test3154.py
232   Test3170.py
233   Test3240.py
234   Test19089.py
235   Test19101.py
236   Test20274_1.py
237   Test20274_2.py
238   Test20274_3.py
239   Test24015.py
240
241   TestArcBehavior.py
242   TestBSplineAddPole.py
243   TestCenteredRectangle.py
244   TestChangeSketchPlane1.py
245   TestChangeSketchPlane2.py
246   TestChangeSketchPlane3.py
247   TestChangeSketchPlane4.py
248   TestConstraintAngle.py
249   TestConstraintAngle_v0_1.py
250   TestConstraintAngle_v0_2.py
251   TestConstraintAngle_v20191210_1.py
252   TestConstraintAngle_v20191210_2.py
253   TestConstraintAngleBehaviorDirect.py
254   TestConstraintAngleBehaviorSupplementary_1.py
255   TestConstraintAngleBehaviorSupplementary_2.py
256   TestConstraintAngleBehaviorBackward_1.py
257   TestConstraintAngleBehaviorBackward_2.py
258   TestConstraintAngleEllipse.py
259   TestConstraintCoincidence.py
260   TestConstraintCoincidenceBSpline.py
261   TestConstraintCoincidenceEllipse.py
262   TestConstraintCoincidenceEllipticArc.py
263   TestConstraintCollinear.py
264   TestConstraintCollinearEllipse.py
265   TestConstraintDistance.py
266   TestConstraintDistanceEllipse.py
267   TestConstraintDistanceBehavior.py
268   TestConstraintDistanceHorizontal.py
269   TestConstraintDistanceVertical.py
270   TestConstraintDistanceZero.py
271   TestConstraintDistanceHorizontalZero.py
272   TestConstraintDistanceVerticalZero.py
273   TestConstraintEqual.py
274   TestConstraintEqualEllipse.py
275   TestConstraintFixed.py
276   TestConstraintHorizontal.py
277   TestConstraintHorizontalValidator.py
278   TestConstraintLength.py
279   TestConstraintMiddlePoint.py
280   TestConstraintMiddlePointOnArc.py
281   TestConstraintMiddlePointOnEllipticArc.py
282   TestConstraintParallel.py
283   TestConstraintPerpendicular.py
284   TestConstraintPerpendicularArcLine.py
285   TestConstraintPerpendicularEllipseLine.py
286   TestConstraintRadius.py
287   TestConstraintRadiusFailure.py
288   TestConstraintTangent.py
289   TestConstraintTangentBSpline.py
290   TestConstraintTangentEllipse.py
291   TestConstraintTangentEllipticArc.py
292   TestConstraintVertical.py
293   TestCreateArcByCenterStartEnd.py
294   TestCreateArcByTangentEdge.py
295   TestCreateArcByThreePoints.py
296   TestCreateArcByTransversalLine.py
297   TestCreateArcChangeType.py
298   TestCreateBSpline.py
299   TestCreateBSplinePeriodic.py
300   TestCreateCircleByCenterAndPassed.py
301   TestCreateCircleByThreePoints.py
302   TestCreateCircleChangeType.py
303   TestCreateEllipseByCenterSemiaxisAndPassed.py
304   TestCreateEllipseByMajorAxisAndPassed.py
305   TestCreateEllipseByExternal.py
306   TestCreateEllipticArc.py
307   TestCreateEllipticArcByExternal.py
308   TestCreateMacroBSpline.py
309   TestCurveFitting1.py
310   TestCurveFitting2.py
311   TestCurveFitting3.py
312   TestCurveFitting4.py
313   TestDegeneratedGeometry.py
314   TestDistanceDump.py
315   TestDistanceSignedVsUnsigned01.py
316   TestDistanceSignedVsUnsigned02.py
317   TestDistanceSignedVsUnsigned03.py
318   TestDistanceSignedVsUnsigned04.py
319   TestDistanceSignedVsUnsigned05.py
320   TestEdgesOrder.py
321   TestFillet.py
322   TestFilletAfterFolder.py
323   TestFilletInteracting.py
324   TestHighload.py
325   TestIntersectionChangeEdge.py
326   TestIntersectionWithCircle.py
327   TestIntersectionWithLine.py
328   TestIntersectionWithSpline.py
329   TestMirror.py
330   TestMultiRotation.py
331   TestMultiRotation01.py
332   TestMultiRotation02.py
333   TestMultiRotation03.py
334   TestMultiRotation04.py
335   TestMultiRotation05.py
336   TestMultiRotationWithParameter.py
337   TestMultiTranslation.py
338   TestOffset1.py
339   TestOffset2.py
340   TestPresentation.py
341   TestProjection.py
342   TestProjectionBSpline.py
343   TestProjectionBSplinePeriodic.py
344   TestProjectionBSplinePeriodicError.py
345   TestProjectionEllipse.py
346   TestProjectionEllipticArc.py
347   TestProjectionIntoResult.py
348   TestProjectionUpdate.py
349   TestProjectionWithoutReference.py
350   TestRectangle.py
351   TestRemainingDoF.py
352   TestRemoveBSpline.py
353   TestRemoveBSplinePeriodic.py
354   TestRemoveEllipse.py
355   TestRemoveEllipticArc.py
356   TestRemoveSketch.py
357   TestSignedDistancePointLine.py
358   TestSignedDistancePointPoint.py
359   TestSketchCopy01.py
360   TestSketchCopy02.py
361   TestSketchCopy03.py
362   TestSketchCopy04.py
363   TestSketchCopy05.py
364   TestSketchCopy06.py
365   TestSketchCopy07.py
366   TestSketchCopy08.py
367   TestSketchCopy09.py
368   TestSketchCopy10.py
369   TestSketchCopy11.py
370   TestSketchCopy12.py
371   TestSketchCopy13.py
372   TestSketchCopy14.py
373   TestSketchDrawer.py
374   TestSketchPointLine.py
375   TestSnowflake.py
376   TestSplit.py
377   TestSplitEllipse.py
378   TestSplitLine.py
379   TestSplitPreview.py
380   TestTrimArc01.py
381   TestTrimArc02.py
382   TestTrimArc03.py
383   TestTrimArc04.py
384   TestTrimArc05.py
385   TestTrimArc06.py
386   TestTrimArc07.py
387   TestTrimArc08.py
388   TestTrimCircle01.py
389   TestTrimCircle02.py
390   TestTrimCircle03.py
391   TestTrimCircle04.py
392   TestTrimCircle05.py
393   TestTrimCircleAndArc01.py
394   TestTrimEllipse.py
395   TestTrimLine01.py
396   TestTrimLine02.py
397   TestTrimLine03.py
398   TestTrimPreview.py
399   TestUpdateSketch.py
400 )
401
402 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
403   ADD_UNIT_TESTS(
404     TestMoveArc.py
405     TestMoveBSpline.py
406     TestMoveBSplinePeriodic.py
407     TestMoveCircle.py
408     TestMoveEllipse.py
409     TestMoveEllipticArc.py
410     TestMoveLine.py
411     TestMovementComplex.py
412     TestMovePoint.py
413   )
414 endif()
415
416 ADD_RESTRICTED_TESTS(
417   Test20204.py
418 )