Salome HOME
11fd87eaf0a2b1ce03e9f0982a85091ed5ac7af0
[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 ("XML Files" FILES ${XML_RESOURCES})
61 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
62
63 ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS)
64 ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES} ${TEXT_RESOURCES})
65 TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
66
67 INSTALL(TARGETS ConstructionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
68 INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
69 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Construction)
70
71 INCLUDE_DIRECTORIES(
72   ../Config
73   ../ModelAPI
74   ../GeomAPI
75   ../GeomAlgoAPI
76   ../Events
77   ../GeomDataAPI
78 )
79
80
81 ADD_UNIT_TESTS(TestAxisCreation.py
82                TestAxis_ErrorMsg.py
83                UnitTestAxis.py
84                TestPoint_XYZ.py
85                TestPoint_IntersectLines.py
86                TestPoint_IntersectLineAndPlane.py
87                TestPoint_IntersectPlanes.py
88                TestPoint_Edge.py
89                TestPoint_ProjectOnEdge.py
90                TestPoint_ProjectOnFace.py
91                TestPoint_GeometricalPropertyCenterOfGravity.py
92                TestPoint_GeometricalPropertyCenterOfCircle.py
93                TestPoint_VertexSelection.py
94                TestPointName.py
95                TestPoint_ErrorMsg.py
96                TestPoint_FiniteValidator.py
97                TestPlane.py
98                TestPlane_ErrorMsg.py
99                TestPlane_FaceValidator.py
100                Test19207.py
101                Test19471.py
102 )