Salome HOME
Task #3230: Sketcher: create a curve passing through selected points or vertices...
[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_Plugin.h
68     SketchPlugin_Point.h
69     SketchPlugin_Projection.h
70     SketchPlugin_Sketch.h
71     SketchPlugin_SketchCopy.h
72     SketchPlugin_SketchDrawer.h
73     SketchPlugin_SketchEntity.h
74     SketchPlugin_Split.h
75     SketchPlugin_Tools.h
76     SketchPlugin_Trim.h
77     SketchPlugin_Validators.h
78 )
79
80 SET(PROJECT_SOURCES
81     SketchPlugin_Arc.cpp
82     SketchPlugin_BSpline.cpp
83     SketchPlugin_BSplineBase.cpp
84     SketchPlugin_BSplinePeriodic.cpp
85     SketchPlugin_Circle.cpp
86     SketchPlugin_Constraint.cpp
87     SketchPlugin_ConstraintAngle.cpp
88     SketchPlugin_ConstraintCoincidence.cpp
89     SketchPlugin_ConstraintCoincidenceInternal.cpp
90     SketchPlugin_ConstraintCollinear.cpp
91     SketchPlugin_ConstraintDistance.cpp
92     SketchPlugin_ConstraintDistanceAlongDir.cpp
93     SketchPlugin_ConstraintDistanceHorizontal.cpp
94     SketchPlugin_ConstraintDistanceVertical.cpp
95     SketchPlugin_ConstraintEqual.cpp
96     SketchPlugin_Fillet.cpp
97     SketchPlugin_ConstraintHorizontal.cpp
98     SketchPlugin_ConstraintLength.cpp
99     SketchPlugin_ConstraintMiddle.cpp
100     SketchPlugin_ConstraintMirror.cpp
101     SketchPlugin_ConstraintParallel.cpp
102     SketchPlugin_ConstraintPerpendicular.cpp
103     SketchPlugin_ConstraintRadius.cpp
104     SketchPlugin_ConstraintRigid.cpp
105     SketchPlugin_ConstraintTangent.cpp
106     SketchPlugin_ConstraintVertical.cpp
107     SketchPlugin_CurveFitting.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_SketchCopy.cpp
126     SketchPlugin_SketchDrawer.cpp
127     SketchPlugin_SketchEntity.cpp
128     SketchPlugin_Split.cpp
129     SketchPlugin_Tools.cpp
130     SketchPlugin_Trim.cpp
131     SketchPlugin_Validators.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-SketchCopy.xml
148   plugin-SketchDrawer.xml
149 )
150
151 SET(TEXT_RESOURCES
152     SketchPlugin_msg_en.ts
153     SketchPlugin_msg_fr.ts
154 )
155
156 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC})
157 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
158 SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
159
160 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
161 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
162 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
163
164 INCLUDE_DIRECTORIES(
165   ../Config
166   ../Events
167   ../ModelAPI
168   ../ModelGeomAlgo
169   ../ModuleBase
170   ../GeomAPI
171   ../GeomAlgoAPI
172   ../GeomDataAPI
173   ../SketcherPrs
174   ${OpenCASCADE_INCLUDE_DIR}
175 )
176
177 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
178 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
179 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
180 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
181
182 ADD_UNIT_TESTS(
183   Test1061.py
184   Test1577.py
185   Test1578.py
186   Test1673.py
187   Test1779.py
188   Test1924.py
189   Test1963.py
190   Test1966.py
191   Test1967.py
192   Test2034_1.py
193   Test2034_2.py
194   Test2034_3.py
195   Test2062.py
196   Test2095.py
197   Test2115.py
198   Test2119.py
199   Test2134.py
200   Test2157.py
201   Test2157_2.py
202   Test2224.py
203   Test2229.py
204   Test2239.py
205   Test2273.py
206   Test2280.py
207   Test2287.py
208   Test2341.py
209   Test2376.py
210   Test2390.py
211   Test2393.py
212   Test2425.py
213   Test2427.py
214   Test2440.py
215   Test2481.py
216   Test2654.py
217   Test2711.py
218   Test2741.py
219   Test2810.py
220   Test2824.py
221   Test2860.py
222   Test2894.py
223   Test3019.py
224   Test3087_1.py
225   Test3087_2.py
226   Test3132.py
227   Test3154.py
228   Test3170.py
229   Test19089.py
230   Test19101.py
231   TestArcBehavior.py
232   TestBSplineAddPole.py
233   TestChangeSketchPlane1.py
234   TestChangeSketchPlane2.py
235   TestChangeSketchPlane3.py
236   TestChangeSketchPlane4.py
237   TestConstraintAngle.py
238   TestConstraintAngle_v0_1.py
239   TestConstraintAngle_v0_2.py
240   TestConstraintAngle_v20191210_1.py
241   TestConstraintAngle_v20191210_2.py
242   TestConstraintAngleBehaviorDirect.py
243   TestConstraintAngleBehaviorSupplementary_1.py
244   TestConstraintAngleBehaviorSupplementary_2.py
245   TestConstraintAngleBehaviorBackward_1.py
246   TestConstraintAngleBehaviorBackward_2.py
247   TestConstraintAngleEllipse.py
248   TestConstraintCoincidence.py
249   TestConstraintCoincidenceBSpline.py
250   TestConstraintCoincidenceEllipse.py
251   TestConstraintCoincidenceEllipticArc.py
252   TestConstraintCollinear.py
253   TestConstraintCollinearEllipse.py
254   TestConstraintDistance.py
255   TestConstraintDistanceEllipse.py
256   TestConstraintDistanceBehavior.py
257   TestConstraintDistanceHorizontal.py
258   TestConstraintDistanceVertical.py
259   TestConstraintDistanceZero.py
260   TestConstraintDistanceHorizontalZero.py
261   TestConstraintDistanceVerticalZero.py
262   TestConstraintEqual.py
263   TestConstraintEqualEllipse.py
264   TestConstraintFixed.py
265   TestConstraintHorizontal.py
266   TestConstraintHorizontalValidator.py
267   TestConstraintLength.py
268   TestConstraintMiddlePoint.py
269   TestConstraintMiddlePointOnArc.py
270   TestConstraintMiddlePointOnEllipticArc.py
271   TestConstraintParallel.py
272   TestConstraintPerpendicular.py
273   TestConstraintPerpendicularArcLine.py
274   TestConstraintPerpendicularEllipseLine.py
275   TestConstraintRadius.py
276   TestConstraintRadiusFailure.py
277   TestConstraintTangent.py
278   TestConstraintTangentBSpline.py
279   TestConstraintTangentEllipse.py
280   TestConstraintTangentEllipticArc.py
281   TestConstraintVertical.py
282   TestCreateArcByCenterStartEnd.py
283   TestCreateArcByTangentEdge.py
284   TestCreateArcByThreePoints.py
285   TestCreateArcByTransversalLine.py
286   TestCreateArcChangeType.py
287   TestCreateBSpline.py
288   TestCreateBSplinePeriodic.py
289   TestCreateCircleByCenterAndPassed.py
290   TestCreateCircleByThreePoints.py
291   TestCreateCircleChangeType.py
292   TestCreateEllipseByCenterSemiaxisAndPassed.py
293   TestCreateEllipseByMajorAxisAndPassed.py
294   TestCreateEllipseByExternal.py
295   TestCreateEllipticArc.py
296   TestCreateEllipticArcByExternal.py
297   TestCreateMacroBSpline.py
298   TestDegeneratedGeometry.py
299   TestDistanceDump.py
300   TestDistanceSignedVsUnsigned01.py
301   TestDistanceSignedVsUnsigned02.py
302   TestDistanceSignedVsUnsigned03.py
303   TestDistanceSignedVsUnsigned04.py
304   TestDistanceSignedVsUnsigned05.py
305   TestEdgesOrder.py
306   TestFillet.py
307   TestFilletAfterFolder.py
308   TestFilletInteracting.py
309   TestHighload.py
310   TestIntersectionChangeEdge.py
311   TestIntersectionWithCircle.py
312   TestIntersectionWithLine.py
313   TestIntersectionWithSpline.py
314   TestMirror.py
315   TestMultiRotation.py
316   TestMultiRotation01.py
317   TestMultiRotation02.py
318   TestMultiRotation03.py
319   TestMultiRotation04.py
320   TestMultiRotation05.py
321   TestMultiRotationWithParameter.py
322   TestMultiTranslation.py
323   TestPresentation.py
324   TestProjection.py
325   TestProjectionBSpline.py
326   TestProjectionBSplinePeriodic.py
327   TestProjectionEllipse.py
328   TestProjectionEllipticArc.py
329   TestProjectionIntoResult.py
330   TestProjectionUpdate.py
331   TestRectangle.py
332   TestRemainingDoF.py
333   TestRemoveBSpline.py
334   TestRemoveBSplinePeriodic.py
335   TestRemoveEllipse.py
336   TestRemoveEllipticArc.py
337   TestRemoveSketch.py
338   TestSignedDistancePointLine.py
339   TestSignedDistancePointPoint.py
340   TestSketchCopy01.py
341   TestSketchCopy02.py
342   TestSketchCopy03.py
343   TestSketchCopy04.py
344   TestSketchCopy05.py
345   TestSketchCopy06.py
346   TestSketchCopy07.py
347   TestSketchCopy08.py
348   TestSketchCopy09.py
349   TestSketchCopy10.py
350   TestSketchCopy11.py
351   TestSketchCopy12.py
352   TestSketchCopy13.py
353   TestSketchCopy14.py
354   TestSketchDrawer.py
355   TestSketchPointLine.py
356   TestSnowflake.py
357   TestSplit.py
358   TestSplitEllipse.py
359   TestSplitLine.py
360   TestSplitPreview.py
361   TestTrimArc01.py
362   TestTrimArc02.py
363   TestTrimArc03.py
364   TestTrimArc04.py
365   TestTrimArc05.py
366   TestTrimArc06.py
367   TestTrimArc07.py
368   TestTrimArc08.py
369   TestTrimCircle01.py
370   TestTrimCircle02.py
371   TestTrimCircle03.py
372   TestTrimCircle04.py
373   TestTrimCircle05.py
374   TestTrimCircleAndArc01.py
375   TestTrimEllipse.py
376   TestTrimLine01.py
377   TestTrimLine02.py
378   TestTrimLine03.py
379   TestTrimPreview.py
380   TestUpdateSketch.py
381 )
382
383 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
384   ADD_UNIT_TESTS(
385     TestMoveArc.py
386     TestMoveBSpline.py
387     TestMoveBSplinePeriodic.py
388     TestMoveCircle.py
389     TestMoveEllipse.py
390     TestMoveEllipticArc.py
391     TestMoveLine.py
392     TestMovementComplex.py
393     TestMovePoint.py
394   )
395 endif()