Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into Dev_2.8.0
[modules/shaper.git] / src / SketchPlugin / CMakeLists.txt
1 ## Copyright (C) 2014-2017  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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 INCLUDE(Common)
22 INCLUDE(UnitTest)
23
24 SET(PROJECT_HEADERS
25     SketchPlugin.h
26     SketchPlugin_Arc.h
27     SketchPlugin_Circle.h
28     SketchPlugin_Constraint.h
29     SketchPlugin_ConstraintAngle.h
30     SketchPlugin_ConstraintBase.h
31     SketchPlugin_ConstraintCoincidence.h
32     SketchPlugin_ConstraintCollinear.h
33     SketchPlugin_ConstraintDistance.h
34     SketchPlugin_ConstraintDistanceHorizontal.h
35     SketchPlugin_ConstraintDistanceVertical.h
36     SketchPlugin_ConstraintEqual.h
37     SketchPlugin_Fillet.h
38     SketchPlugin_ConstraintHorizontal.h
39     SketchPlugin_ConstraintLength.h
40     SketchPlugin_ConstraintMiddle.h
41     SketchPlugin_ConstraintMirror.h
42     SketchPlugin_ConstraintParallel.h
43     SketchPlugin_ConstraintPerpendicular.h
44     SketchPlugin_ConstraintRadius.h
45     SketchPlugin_ConstraintRigid.h
46     SketchPlugin_ConstraintTangent.h
47     SketchPlugin_ConstraintVertical.h
48     SketchPlugin_Ellipse.h
49     SketchPlugin_ExternalValidator.h
50     SketchPlugin_Feature.h
51     SketchPlugin_IntersectionPoint.h
52     SketchPlugin_Line.h
53     SketchPlugin_MacroArc.h
54     SketchPlugin_MacroArcReentrantMessage.h
55     SketchPlugin_MacroCircle.h
56     SketchPlugin_MacroEllipse.h
57     SketchPlugin_MultiRotation.h
58     SketchPlugin_MultiTranslation.h
59     SketchPlugin_Plugin.h
60     SketchPlugin_Point.h
61     SketchPlugin_Projection.h
62     SketchPlugin_Sketch.h
63     SketchPlugin_SketchEntity.h
64     SketchPlugin_Split.h
65     SketchPlugin_Tools.h
66     SketchPlugin_Trim.h
67     SketchPlugin_Validators.h
68 )
69
70 SET(PROJECT_SOURCES
71     SketchPlugin_Arc.cpp
72     SketchPlugin_Circle.cpp
73     SketchPlugin_Constraint.cpp
74     SketchPlugin_ConstraintAngle.cpp
75     SketchPlugin_ConstraintBase.cpp
76     SketchPlugin_ConstraintCoincidence.cpp
77     SketchPlugin_ConstraintCollinear.cpp
78     SketchPlugin_ConstraintDistance.cpp
79     SketchPlugin_ConstraintDistanceHorizontal.cpp
80     SketchPlugin_ConstraintDistanceVertical.cpp
81     SketchPlugin_ConstraintEqual.cpp
82     SketchPlugin_Fillet.cpp
83     SketchPlugin_ConstraintHorizontal.cpp
84     SketchPlugin_ConstraintLength.cpp
85     SketchPlugin_ConstraintMiddle.cpp
86     SketchPlugin_ConstraintMirror.cpp
87     SketchPlugin_ConstraintParallel.cpp
88     SketchPlugin_ConstraintPerpendicular.cpp
89     SketchPlugin_ConstraintRadius.cpp
90     SketchPlugin_ConstraintRigid.cpp
91     SketchPlugin_ConstraintTangent.cpp
92     SketchPlugin_ConstraintVertical.cpp
93     SketchPlugin_Ellipse.cpp
94     SketchPlugin_ExternalValidator.cpp
95     SketchPlugin_Feature.cpp
96     SketchPlugin_IntersectionPoint.cpp
97     SketchPlugin_Line.cpp
98     SketchPlugin_MacroArc.cpp
99     SketchPlugin_MacroCircle.cpp
100     SketchPlugin_MacroEllipse.cpp
101     SketchPlugin_MultiRotation.cpp
102     SketchPlugin_MultiTranslation.cpp
103     SketchPlugin_Plugin.cpp
104     SketchPlugin_Point.cpp
105     SketchPlugin_Projection.cpp
106     SketchPlugin_Sketch.cpp
107     SketchPlugin_SketchEntity.cpp
108     SketchPlugin_Split.cpp
109     SketchPlugin_Tools.cpp
110     SketchPlugin_Trim.cpp
111     SketchPlugin_Validators.cpp
112 )
113
114 SET(PROJECT_LIBRARIES
115     Config
116     GeomAPI
117     GeomAlgoAPI
118     ModelAPI
119     ModelGeomAlgo
120     SketcherPrs
121     GeomDataAPI
122 )
123
124 SET(XML_RESOURCES
125   plugin-Sketch.xml
126 )
127
128 SET(TEXT_RESOURCES
129         SketchPlugin_msg_en.ts
130 )
131
132 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
133
134 ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
135 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
136 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
137
138 INCLUDE_DIRECTORIES(
139   ../Config
140   ../Events
141   ../ModelAPI
142   ../ModelGeomAlgo
143   ../GeomAPI
144   ../GeomAlgoAPI
145   ../GeomDataAPI
146   ../SketcherPrs
147 )
148
149 INSTALL(TARGETS SketchPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
150 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
151 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Sketch)
152 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
153
154 ADD_UNIT_TESTS(TestSketchPointLine.py
155                TestCreateArcByCenterStartEnd.py
156                TestCreateArcByThreePoints.py
157                TestCreateArcByTangentEdge.py
158                TestCreateArcChangeType.py
159                TestCreateCircleByCenterAndPassed.py
160                TestCreateCircleByThreePoints.py
161                TestCreateCircleChangeType.py
162                TestConstraintCoincidence.py
163                TestConstraintCollinear.py
164                TestConstraintLength.py
165                TestConstraintDistance.py
166                TestConstraintDistanceHorizontal.py
167                TestConstraintDistanceVertical.py
168                TestConstraintDistanceBehavior.py
169                TestConstraintParallel.py
170                TestConstraintPerpendicular.py
171                TestConstraintRadius.py
172                TestConstraintFixed.py
173                TestConstraintHorizontal.py
174                TestConstraintHorizontalValidator.py
175                TestConstraintVertical.py
176                TestConstraintEqual.py
177                TestConstraintTangent.py
178                TestConstraintAngle.py
179                TestConstraintMiddlePoint.py
180                TestMirror.py
181                TestMultiRotation.py
182                TestMultiTranslation.py
183                TestFillet.py
184                TestFilletInteracting.py
185                TestRectangle.py
186                TestProjection.py
187                TestProjectionIntoResult.py
188                TestSplit.py
189                TestHighload.py
190                TestSnowflake.py
191                TestArcBehavior.py
192                TestRemoveSketch.py
193                Test1061.py
194                Test1673.py
195                Test1924.py
196                Test1966.py
197                Test1967.py
198                Test2095.py
199                Test2115.py
200                TestTrimArc01.py
201                TestTrimArc02.py
202                TestTrimArc03.py
203                TestTrimArc04.py
204                TestTrimArc05.py
205                TestTrimArc06.py
206                TestTrimArc07.py
207                TestTrimCircle01.py
208                TestTrimCircle02.py
209                TestTrimCircle03.py
210                TestTrimCircle04.py
211                TestTrimCircle05.py
212                TestTrimCircleAndArc01.py
213                TestTrimLine01.py
214                TestTrimLine02.py
215                Test2229.py
216                Test2239.py
217                TestDistanceSignedVsUnsigned01.py
218                TestDistanceSignedVsUnsigned02.py
219                TestDistanceSignedVsUnsigned03.py
220                TestDistanceSignedVsUnsigned04.py
221                TestDistanceSignedVsUnsigned05.py
222                TestSignedDistancePointPoint.py
223                TestSignedDistancePointLine.py
224 )
225
226 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
227   ADD_UNIT_TESTS(
228                TestMovePoint.py
229                TestMoveLine.py
230                TestMoveCircle.py
231                TestMoveArc.py
232                TestMovementComplex.py
233   )
234 endif()