Salome HOME
733c84739b188fc25423efc1c86f47656ad9a5b9
[modules/shaper.git] / src / ConstructionPlugin / 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     ConstructionPlugin.h
25     ConstructionPlugin_Plugin.h
26     ConstructionPlugin_Point.h
27     ConstructionPlugin_Axis.h
28     ConstructionPlugin_Plane.h
29     ConstructionPlugin_Validators.h
30 )
31
32 SET(PROJECT_SOURCES
33     ConstructionPlugin_Plugin.cpp
34     ConstructionPlugin_Point.cpp
35     ConstructionPlugin_Axis.cpp
36     ConstructionPlugin_Plane.cpp
37     ConstructionPlugin_Validators.cpp
38 )
39
40 SET(XML_RESOURCES
41   plugin-Construction.xml
42   point_widget.xml
43   axis_widget.xml
44   plane_widget.xml
45 )
46
47 SET(TEXT_RESOURCES
48   ConstructionPlugin_msg_en.ts
49   ConstructionPlugin_msg_fr.ts
50 )
51
52 SET(PROJECT_LIBRARIES
53     Config
54     ModelAPI
55     GeomAPI
56     GeomAlgoAPI
57     GeomDataAPI
58 )
59
60 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
61
62 ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS)
63 ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
64 TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
65
66 INSTALL(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
67 INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
68 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction)
69
70 INCLUDE_DIRECTORIES(
71   ../Config
72   ../ModelAPI
73   ../GeomAPI
74   ../GeomAlgoAPI
75   ../Events
76   ../GeomDataAPI
77 )
78
79
80 ADD_UNIT_TESTS(TestAxisCreation.py
81                TestAxis_ErrorMsg.py
82                UnitTestAxis.py
83                TestPoint_XYZ.py
84                TestPoint_IntersectLines.py
85                TestPoint_IntersectLineAndPlane.py
86                TestPoint_IntersectPlanes.py
87                TestPoint_Edge.py
88                TestPoint_ProjectOnEdge.py
89                TestPoint_ProjectOnFace.py
90                TestPoint_GeometricalPropertyCenterOfGravity.py
91                TestPoint_GeometricalPropertyCenterOfCircle.py
92                TestPoint_VertexSelection.py
93                TestPointName.py
94                TestPoint_ErrorMsg.py
95                TestPoint_FiniteValidator.py
96                TestPlane.py
97                TestPlane_ErrorMsg.py
98                TestPlane_FaceValidator.py
99 )