Salome HOME
Task 2.5. Combination operations on Groups (issue #2935)
[modules/shaper.git] / src / CollectionPlugin / 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 INCLUDE(UseQtExt)
23
24 # additional include directories
25 INCLUDE_DIRECTORIES(${QT_INCLUDES})
26
27 # additional preprocessor / compiler flags
28 ADD_DEFINITIONS(${QT_DEFINITIONS})
29
30 SET(PROJECT_HEADERS
31     CollectionPlugin.h
32     CollectionPlugin_Plugin.h
33     CollectionPlugin_Group.h
34     CollectionPlugin_GroupAddition.h
35     CollectionPlugin_Field.h
36     CollectionPlugin_WidgetCreator.h
37     CollectionPlugin_WidgetField.h
38     CollectionPlugin_Validators.h
39 )
40
41 SET(PROJECT_MOC_HEADERS
42     CollectionPlugin_WidgetField.h
43 )
44
45 SET(PROJECT_SOURCES
46     CollectionPlugin_Plugin.cpp
47     CollectionPlugin_Group.cpp
48     CollectionPlugin_GroupAddition.cpp
49     CollectionPlugin_Field.cpp
50     CollectionPlugin_WidgetCreator.cpp
51     CollectionPlugin_WidgetField.cpp
52     CollectionPlugin_Validators.cpp
53 )
54
55 SET(XML_RESOURCES
56   plugin-Collection.xml
57   group_widget.xml
58   group_addition_widget.xml
59   group_intersection_widget.xml
60   group_substraction_widget.xml
61 )
62
63 SET(TEXT_RESOURCES
64     CollectionPlugin_msg_en.ts
65 )
66
67 # sources / moc wrappings
68 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
69
70 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
71
72 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
73 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
74
75
76 INCLUDE_DIRECTORIES(
77   ../ModelAPI
78   ../GeomAPI
79   ../GeomAlgoAPI
80   ../GeomValidators
81   ../Events
82   ../ModuleBase
83   ../Config
84   ${OpenCASCADE_INCLUDE_DIR}
85 )
86
87 SET(PROJECT_LIBRARIES
88     Events
89     ModelAPI
90     GeomAPI
91     GeomAlgoAPI
92     GeomValidators
93     ModuleBase
94 )
95
96 ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
97 ADD_LIBRARY(CollectionPlugin MODULE
98             ${PROJECT_SOURCES}
99             ${PROJECT_HEADERS}
100             ${XML_RESOURCES}
101             ${TEXT_RESOURCES}
102             ${PROJECT_AUTOMOC})
103 TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
104
105 INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
106 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
107 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
108 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
109
110 ADD_UNIT_TESTS(
111                TestGroup.py
112                TestGroup2.py
113                TestField.py
114                TestGroup1799.py
115                TestGroupMove01.py
116                TestGroupMove02.py
117                TestGroupMove03.py
118                TestGroupMove04.py
119                TestGroupMove05.py
120                TestGroupMove06.py
121                TestGroupMove07.py
122                TestGroupMove08.py
123                TestGroupMove09.py
124                TestGroupMove10.py
125                TestGroupMove11.py
126                TestGroupMove12.py
127                TestGroupMove13.py
128                TestGroupMove14.py
129                TestGroupMove15.py
130                TestGroupMove16.py
131                TestGroupMove17.py
132                TestGroupMove18.py
133                TestGroupMove19.py
134                TestGroupMove20.py
135                TestGroupShareTopology.py
136 )