Salome HOME
Merge branch 'Pre_2.8.0_development'
[modules/shaper.git] / src / CollectionPlugin / CMakeLists.txt
1 ## Copyright (C) 2014-2017  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
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 INCLUDE(Common)
22 INCLUDE(UnitTest)
23 INCLUDE(UseQtExt)
24
25 # additional include directories
26 INCLUDE_DIRECTORIES(${QT_INCLUDES})
27
28 # additional preprocessor / compiler flags
29 ADD_DEFINITIONS(${QT_DEFINITIONS})
30
31 SET(PROJECT_HEADERS
32     CollectionPlugin.h
33     CollectionPlugin_Plugin.h
34     CollectionPlugin_Group.h
35     CollectionPlugin_Field.h
36     CollectionPlugin_WidgetCreator.h
37     CollectionPlugin_WidgetField.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 )
51
52 SET(XML_RESOURCES
53   plugin-Collection.xml
54   group_widget.xml
55 )
56
57 SET(TEXT_RESOURCES
58     CollectionPlugin_msg_en.ts
59 )
60
61 # sources / moc wrappings
62 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
63
64 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
65
66 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
67 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
68
69
70 INCLUDE_DIRECTORIES(
71   ../ModelAPI
72   ../GeomAPI
73   ../GeomAlgoAPI
74   ../GeomValidators
75   ../Events
76   ../ModuleBase
77   ../Config
78   ${CAS_INCLUDE_DIRS}
79 )
80
81 SET(PROJECT_LIBRARIES
82     Events
83     ModelAPI
84     GeomAPI
85     GeomAlgoAPI
86     GeomValidators
87     ModuleBase
88 )
89
90 ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${CAS_DEFINITIONS})
91 ADD_LIBRARY(CollectionPlugin MODULE
92             ${PROJECT_SOURCES}
93             ${PROJECT_HEADERS}
94             ${XML_RESOURCES}
95             ${TEXT_RESOURCES}
96             ${PROJECT_AUTOMOC})
97 TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
98
99 INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
100 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
101 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
102 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
103
104 ADD_UNIT_TESTS(
105                TestGroup.py
106                TestField.py
107                TestGroup1799.py
108 )