Salome HOME
Issue #17347: B-Splines in 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_Circle.h
28     SketchPlugin_Constraint.h
29     SketchPlugin_ConstraintAngle.h
30     SketchPlugin_ConstraintBase.h
31     SketchPlugin_ConstraintCoincidence.h
32     SketchPlugin_ConstraintCoincidenceInternal.h
33     SketchPlugin_ConstraintCollinear.h
34     SketchPlugin_ConstraintDistance.h
35     SketchPlugin_ConstraintDistanceAlongDir.h
36     SketchPlugin_ConstraintDistanceHorizontal.h
37     SketchPlugin_ConstraintDistanceVertical.h
38     SketchPlugin_ConstraintEqual.h
39     SketchPlugin_Fillet.h
40     SketchPlugin_ConstraintHorizontal.h
41     SketchPlugin_ConstraintLength.h
42     SketchPlugin_ConstraintMiddle.h
43     SketchPlugin_ConstraintMirror.h
44     SketchPlugin_ConstraintParallel.h
45     SketchPlugin_ConstraintPerpendicular.h
46     SketchPlugin_ConstraintRadius.h
47     SketchPlugin_ConstraintRigid.h
48     SketchPlugin_ConstraintTangent.h
49     SketchPlugin_ConstraintVertical.h
50     SketchPlugin_Ellipse.h
51     SketchPlugin_EllipticArc.h
52     SketchPlugin_ExternalValidator.h
53     SketchPlugin_Feature.h
54     SketchPlugin_IntersectionPoint.h
55     SketchPlugin_Line.h
56     SketchPlugin_MacroArc.h
57     SketchPlugin_MacroArcReentrantMessage.h
58     SketchPlugin_MacroBSpline.h
59     SketchPlugin_MacroCircle.h
60     SketchPlugin_MacroEllipse.h
61     SketchPlugin_MacroEllipticArc.h
62     SketchPlugin_MultiRotation.h
63     SketchPlugin_MultiTranslation.h
64     SketchPlugin_Plugin.h
65     SketchPlugin_Point.h
66     SketchPlugin_Projection.h
67     SketchPlugin_Sketch.h
68     SketchPlugin_SketchEntity.h
69     SketchPlugin_Split.h
70     SketchPlugin_Tools.h
71     SketchPlugin_Trim.h
72     SketchPlugin_Validators.h
73     SketchPlugin_SketchDrawer.h
74 )
75
76 SET(PROJECT_SOURCES
77     SketchPlugin_Arc.cpp
78     SketchPlugin_BSpline.cpp
79     SketchPlugin_Circle.cpp
80     SketchPlugin_Constraint.cpp
81     SketchPlugin_ConstraintAngle.cpp
82     SketchPlugin_ConstraintCoincidence.cpp
83     SketchPlugin_ConstraintCoincidenceInternal.cpp
84     SketchPlugin_ConstraintCollinear.cpp
85     SketchPlugin_ConstraintDistance.cpp
86     SketchPlugin_ConstraintDistanceAlongDir.cpp
87     SketchPlugin_ConstraintDistanceHorizontal.cpp
88     SketchPlugin_ConstraintDistanceVertical.cpp
89     SketchPlugin_ConstraintEqual.cpp
90     SketchPlugin_Fillet.cpp
91     SketchPlugin_ConstraintHorizontal.cpp
92     SketchPlugin_ConstraintLength.cpp
93     SketchPlugin_ConstraintMiddle.cpp
94     SketchPlugin_ConstraintMirror.cpp
95     SketchPlugin_ConstraintParallel.cpp
96     SketchPlugin_ConstraintPerpendicular.cpp
97     SketchPlugin_ConstraintRadius.cpp
98     SketchPlugin_ConstraintRigid.cpp
99     SketchPlugin_ConstraintTangent.cpp
100     SketchPlugin_ConstraintVertical.cpp
101     SketchPlugin_Ellipse.cpp
102     SketchPlugin_EllipticArc.cpp
103     SketchPlugin_ExternalValidator.cpp
104     SketchPlugin_Feature.cpp
105     SketchPlugin_IntersectionPoint.cpp
106     SketchPlugin_Line.cpp
107     SketchPlugin_MacroArc.cpp
108     SketchPlugin_MacroBSpline.cpp
109     SketchPlugin_MacroCircle.cpp
110     SketchPlugin_MacroEllipse.cpp
111     SketchPlugin_MacroEllipticArc.cpp
112     SketchPlugin_MultiRotation.cpp
113     SketchPlugin_MultiTranslation.cpp
114     SketchPlugin_Plugin.cpp
115     SketchPlugin_Point.cpp
116     SketchPlugin_Projection.cpp
117     SketchPlugin_Sketch.cpp
118     SketchPlugin_SketchEntity.cpp
119     SketchPlugin_Split.cpp
120     SketchPlugin_Tools.cpp
121     SketchPlugin_Trim.cpp
122     SketchPlugin_Validators.cpp
123     SketchPlugin_SketchDrawer.cpp
124 )
125
126 SET(PROJECT_LIBRARIES
127     Config
128     GeomAPI
129     GeomAlgoAPI
130     ModelAPI
131     ModelGeomAlgo
132     SketcherPrs
133     GeomDataAPI
134 )
135
136 SET(XML_RESOURCES
137   plugin-Sketch.xml
138   plugin-SketchDrawer.xml
139 )
140
141 SET(TEXT_RESOURCES
142         SketchPlugin_msg_en.ts
143         SketchPlugin_msg_fr.ts
144 )
145
146 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
147
148 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
149 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
150 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
151
152 INCLUDE_DIRECTORIES(
153   ../Config
154   ../Events
155   ../ModelAPI
156   ../ModelGeomAlgo
157   ../GeomAPI
158   ../GeomAlgoAPI
159   ../GeomDataAPI
160   ../SketcherPrs
161 )
162
163 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
164 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
165 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
166 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
167
168 ADD_UNIT_TESTS(
169   Test1061.py
170   Test1577.py
171   Test1578.py
172   Test1673.py
173   Test1779.py
174   Test1924.py
175   Test1963.py
176   Test1966.py
177   Test1967.py
178   Test2034_1.py
179   Test2034_2.py
180   Test2034_3.py
181   Test2062.py
182   Test2095.py
183   Test2115.py
184   Test2119.py
185   Test2134.py
186   Test2157.py
187   Test2157_2.py
188   Test2224.py
189   Test2229.py
190   Test2239.py
191   Test2273.py
192   Test2280.py
193   Test2287.py
194   Test2341.py
195   Test2376.py
196   Test2390.py
197   Test2393.py
198   Test2425.py
199   Test2427.py
200   Test2440.py
201   Test2481.py
202   Test2654.py
203   Test2711.py
204   Test2741.py
205   Test2810.py
206   Test2824.py
207   Test2860.py
208   Test2894.py
209   Test3019.py
210   Test3087_1.py
211   Test3087_2.py
212   TestArcBehavior.py
213   TestChangeSketchPlane1.py
214   TestChangeSketchPlane2.py
215   TestChangeSketchPlane3.py
216   TestChangeSketchPlane4.py
217   TestConstraintAngle.py
218   TestConstraintAngle_v0_1.py
219   TestConstraintAngle_v0_2.py
220   TestConstraintAngle_v20191210_1.py
221   TestConstraintAngle_v20191210_2.py
222   TestConstraintAngleBehaviorDirect.py
223   TestConstraintAngleBehaviorSupplementary_1.py
224   TestConstraintAngleBehaviorSupplementary_2.py
225   TestConstraintAngleBehaviorBackward_1.py
226   TestConstraintAngleBehaviorBackward_2.py
227   TestConstraintAngleEllipse.py
228   TestConstraintCoincidence.py
229   TestConstraintCoincidenceEllipse.py
230   TestConstraintCoincidenceEllipticArc.py
231   TestConstraintCollinear.py
232   TestConstraintCollinearEllipse.py
233   TestConstraintDistance.py
234   TestConstraintDistanceEllipse.py
235   TestConstraintDistanceBehavior.py
236   TestConstraintDistanceHorizontal.py
237   TestConstraintDistanceVertical.py
238   TestConstraintDistanceZero.py
239   TestConstraintDistanceHorizontalZero.py
240   TestConstraintDistanceVerticalZero.py
241   TestConstraintEqual.py
242   TestConstraintEqualEllipse.py
243   TestConstraintFixed.py
244   TestConstraintHorizontal.py
245   TestConstraintHorizontalValidator.py
246   TestConstraintLength.py
247   TestConstraintMiddlePoint.py
248   TestConstraintMiddlePointOnArc.py
249   TestConstraintMiddlePointOnEllipticArc.py
250   TestConstraintParallel.py
251   TestConstraintPerpendicular.py
252   TestConstraintPerpendicularArcLine.py
253   TestConstraintPerpendicularEllipseLine.py
254   TestConstraintRadius.py
255   TestConstraintRadiusFailure.py
256   TestConstraintTangent.py
257   TestConstraintTangentEllipse.py
258   TestConstraintTangentEllipticArc.py
259   TestConstraintVertical.py
260   TestCreateArcByCenterStartEnd.py
261   TestCreateArcByTangentEdge.py
262   TestCreateArcByThreePoints.py
263   TestCreateArcByTransversalLine.py
264   TestCreateArcChangeType.py
265   TestCreateCircleByCenterAndPassed.py
266   TestCreateCircleByThreePoints.py
267   TestCreateCircleChangeType.py
268   TestCreateEllipseByCenterSemiaxisAndPassed.py
269   TestCreateEllipseByMajorAxisAndPassed.py
270   TestCreateEllipseByExternal.py
271   TestCreateEllipticArc.py
272   TestCreateEllipticArcByExternal.py
273   TestDegeneratedGeometry.py
274   TestDistanceDump.py
275   TestDistanceSignedVsUnsigned01.py
276   TestDistanceSignedVsUnsigned02.py
277   TestDistanceSignedVsUnsigned03.py
278   TestDistanceSignedVsUnsigned04.py
279   TestDistanceSignedVsUnsigned05.py
280   TestEdgesOrder.py
281   TestFillet.py
282   TestFilletAfterFolder.py
283   TestFilletInteracting.py
284   TestHighload.py
285   TestIntersectionChangeEdge.py
286   TestIntersectionWithCircle.py
287   TestIntersectionWithLine.py
288   TestIntersectionWithSpline.py
289   TestMirror.py
290   TestMultiRotation.py
291   TestMultiRotation01.py
292   TestMultiRotation02.py
293   TestMultiRotation03.py
294   TestMultiRotation04.py
295   TestMultiRotation05.py
296   TestMultiRotationWithParameter.py
297   TestMultiTranslation.py
298   TestPresentation.py
299   TestProjection.py
300   TestProjectionEllipse.py
301   TestProjectionEllipticArc.py
302   TestProjectionIntoResult.py
303   TestProjectionUpdate.py
304   TestRectangle.py
305   TestRemainingDoF.py
306   TestRemoveEllipse.py
307   TestRemoveEllipticArc.py
308   TestRemoveSketch.py
309   TestSignedDistancePointLine.py
310   TestSignedDistancePointPoint.py
311   TestSketchDrawer.py
312   TestSketchPointLine.py
313   TestSnowflake.py
314   TestSplit.py
315   TestSplitEllipse.py
316   TestSplitLine.py
317   TestSplitPreview.py
318   TestTrimArc01.py
319   TestTrimArc02.py
320   TestTrimArc03.py
321   TestTrimArc04.py
322   TestTrimArc05.py
323   TestTrimArc06.py
324   TestTrimArc07.py
325   TestTrimArc08.py
326   TestTrimCircle01.py
327   TestTrimCircle02.py
328   TestTrimCircle03.py
329   TestTrimCircle04.py
330   TestTrimCircle05.py
331   TestTrimCircleAndArc01.py
332   TestTrimEllipse.py
333   TestTrimLine01.py
334   TestTrimLine02.py
335   TestTrimLine03.py
336   TestTrimPreview.py
337   TestUpdateSketch.py
338 )
339
340 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
341   ADD_UNIT_TESTS(
342     TestMoveArc.py
343     TestMoveCircle.py
344     TestMoveEllipse.py
345     TestMoveEllipticArc.py
346     TestMoveLine.py
347     TestMovementComplex.py
348     TestMovePoint.py
349   )
350 endif()