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