]> SALOME platform Git repositories - modules/shaper.git/blob - src/CollectionPlugin/CMakeLists.txt
Salome HOME
Merge remote-tracking branch 'origin/SALOME-8.2.0_porting'
[modules/shaper.git] / src / CollectionPlugin / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 INCLUDE(Common)
4 INCLUDE(UnitTest)
5 INCLUDE(UseQtExt)
6
7 # additional include directories
8 INCLUDE_DIRECTORIES(${QT_INCLUDES})
9
10 # additional preprocessor / compiler flags
11 ADD_DEFINITIONS(${QT_DEFINITIONS})
12
13 SET(PROJECT_HEADERS
14     CollectionPlugin.h
15     CollectionPlugin_Plugin.h
16     CollectionPlugin_Group.h
17     CollectionPlugin_Field.h
18     CollectionPlugin_WidgetCreator.h
19     CollectionPlugin_WidgetField.h
20 )
21
22 SET(PROJECT_SOURCES
23     CollectionPlugin_Plugin.cpp
24     CollectionPlugin_Group.cpp
25     CollectionPlugin_Field.cpp
26     CollectionPlugin_WidgetCreator.cpp
27     CollectionPlugin_WidgetField.cpp
28 )
29
30 SET(XML_RESOURCES
31   plugin-Collection.xml
32   group_widget.xml
33 )
34
35 SET(TEXT_RESOURCES
36     CollectionPlugin_msg_en.ts
37 )
38
39 # sources / moc wrappings
40 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_HEADERS})
41
42 #QT5_ADD_TRANSLATION(QM_RESOURCES ${TEXT_RESOURCES})
43
44 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${PROJECT_COMPILED_RESOURCES} ${QM_RESOURCES})
45 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
46
47
48 INCLUDE_DIRECTORIES(
49   ../ModelAPI
50   ../GeomAPI
51   ../GeomAlgoAPI
52   ../GeomValidators
53   ../Events
54   ../ModuleBase
55   ../Config
56   ${CAS_INCLUDE_DIRS}
57 )
58
59 SET(PROJECT_LIBRARIES
60     Events
61     ModelAPI
62     GeomAPI
63     GeomAlgoAPI
64     GeomValidators
65     ModuleBase
66 )
67
68 ADD_DEFINITIONS(-DCOLLECTIONPLUGIN_EXPORTS ${CAS_DEFINITIONS})
69 ADD_LIBRARY(CollectionPlugin MODULE
70             ${PROJECT_SOURCES}
71             ${PROJECT_HEADERS}
72             ${XML_RESOURCES}
73             ${TEXT_RESOURCES}
74             ${PROJECT_AUTOMOC})
75 TARGET_LINK_LIBRARIES(CollectionPlugin ${PROJECT_LIBRARIES})
76
77 INSTALL(TARGETS CollectionPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
78 INSTALL(FILES ${XML_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
79 INSTALL(DIRECTORY icons/ DESTINATION ${SHAPER_INSTALL_XML_RESOURCES}/icons/Collection)
80 INSTALL(FILES ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
81
82 ADD_UNIT_TESTS(
83                TestGroup.py
84                TestField.py
85                TestGroup1799.py
86 )