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