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