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