Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / CollectionPlugin / 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 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_GroupIntersection.h
36     CollectionPlugin_GroupOperation.h
37     CollectionPlugin_GroupSubstraction.h
38     CollectionPlugin_Field.h
39     CollectionPlugin_WidgetCreator.h
40     CollectionPlugin_WidgetField.h
41     CollectionPlugin_Validators.h
42 )
43
44 SET(PROJECT_MOC_HEADERS
45     CollectionPlugin_WidgetField.h
46 )
47
48 SET(PROJECT_SOURCES
49     CollectionPlugin_Plugin.cpp
50     CollectionPlugin_Group.cpp
51     CollectionPlugin_GroupAddition.cpp
52     CollectionPlugin_GroupIntersection.cpp
53     CollectionPlugin_GroupOperation.cpp
54     CollectionPlugin_GroupSubstraction.cpp
55     CollectionPlugin_Field.cpp
56     CollectionPlugin_WidgetCreator.cpp
57     CollectionPlugin_WidgetField.cpp
58     CollectionPlugin_Validators.cpp
59 )
60
61 SET(XML_RESOURCES
62   plugin-Collection.xml
63   group_widget.xml
64   group_addition_widget.xml
65   group_intersection_widget.xml
66   group_substraction_widget.xml
67 )
68
69 SET(TEXT_RESOURCES
70     CollectionPlugin_msg_en.ts
71     CollectionPlugin_msg_fr.ts
72 )
73
74 # sources / moc wrappings
75 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
76
77 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
78
79 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
80 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
81 SOURCE_GROUP ("XML Files" FILES ${XML_RESOURCES})
82
83
84 INCLUDE_DIRECTORIES(
85   ../ModelAPI
86   ../GeomAPI
87   ../GeomAlgoAPI
88   ../GeomValidators
89   ../Events
90   ../ModuleBase
91   ../Config
92   ${OpenCASCADE_INCLUDE_DIR}
93 )
94
95 SET(PROJECT_LIBRARIES
96     Events
97     ModelAPI
98     GeomAPI
99     GeomAlgoAPI
100     GeomValidators
101     ModuleBase
102 )
103
104 ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
105 ADD_LIBRARY(CollectionPlugin MODULE
106             ${PROJECT_SOURCES}
107             ${PROJECT_HEADERS}
108             ${XML_RESOURCES}
109             ${TEXT_RESOURCES}
110             ${PROJECT_AUTOMOC})
111 TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
112
113 INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
114 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
115 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
116 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
117
118 ADD_UNIT_TESTS(
119                TestGroup.py
120                TestGroup2.py
121                TestField.py
122                TestGroup1799.py
123                TestGroupMove01.py
124                TestGroupMove02.py
125                TestGroupMove03.py
126                TestGroupMove04.py
127                TestGroupMove05.py
128                TestGroupMove06.py
129                TestGroupMove07.py
130                TestGroupMove08.py
131                TestGroupMove09.py
132                TestGroupMove10.py
133                TestGroupMove11.py
134                TestGroupMove12.py
135                TestGroupMove13.py
136                TestGroupMove14.py
137                TestGroupMove15.py
138                TestGroupMove16.py
139                TestGroupMove17.py
140                TestGroupMove18.py
141                TestGroupMove19.py
142                TestGroupMove20.py
143                TestGroupMove21.py
144                TestGroupMove22.py
145                TestGroupMove23.py
146                TestGroupMove24.py
147                TestGroupMove25.py
148                TestGroupMove26.py
149                TestGroupShareTopology.py
150                TestGroupAddition.py
151                TestGroupAddition_Error.py
152                TestGroupIntersection.py
153                TestGroupIntersection_Error.py
154                TestGroupSubstraction.py
155                TestGroupSubstraction2.py
156                TestGroupSubstraction_Error1.py
157                TestGroupSubstraction_Error2.py
158                Test2977.py
159                TestGroupWholeResult1.py
160                TestGroupWholeResult2.py
161                Test3031.py
162                TestGroupWholeFeature1.py
163                TestGroupWholeFeature2.py
164                TestGroupMoveAndSplit1.py
165                TestGroupMoveAndSplit2.py
166                TestGroupMoveAndSplit3.py
167                TestGroupMoveAndSplit4.py
168                Test3114.py
169                Test18739.py
170 )