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