Salome HOME
[Code coverage ParametersPlugin]: Unit tests for parameter remove and for error treating
[modules/shaper.git] / src / ParametersPlugin / 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     ParametersPlugin.h
33     ParametersPlugin_Plugin.h
34     ParametersPlugin_Parameter.h
35     ParametersPlugin_EvalListener.h
36     ParametersPlugin_Validators.h
37     ParametersPlugin_WidgetCreator.h
38     ParametersPlugin_ParametersMgr.h
39     ParametersPlugin_WidgetParamsMgr.h
40 )
41
42 SET(PROJECT_MOC_HEADERS
43     ParametersPlugin_WidgetParamsMgr.h
44 )
45
46 SET(PROJECT_SOURCES
47     ParametersPlugin_Plugin.cpp
48     ParametersPlugin_Parameter.cpp
49    ParametersPlugin_EvalListener.cpp
50     ParametersPlugin_Validators.cpp
51     ParametersPlugin_WidgetCreator.cpp
52     ParametersPlugin_ParametersMgr.cpp
53     ParametersPlugin_WidgetParamsMgr.cpp
54 )
55
56 SET(XML_RESOURCES
57     plugin-Parameters.xml
58 )
59
60 INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/Events
61                     ${PROJECT_SOURCE_DIR}/src/Config
62                     ${PROJECT_SOURCE_DIR}/src/ModelAPI
63                     ${PROJECT_SOURCE_DIR}/src/GeomAPI
64                     ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
65                     ${PROJECT_SOURCE_DIR}/src/ModuleBase
66                     ${OpenCASCADE_INCLUDE_DIR}
67 )
68
69 SET(PROJECT_LIBRARIES
70     Events
71     Config
72     ModelAPI
73     ModuleBase
74     ${QT_LIBRARIES}
75 )
76
77 ADD_DEFINITIONS(-DPARAMETERSPLUGIN_EXPORTS ${OpenCASCADE_DEFINITIONS})
78
79 SET(TEXT_RESOURCES
80         ParametersPlugin_msg_ru.ts
81         ParametersPlugin_msg_en.ts
82 )
83
84 # QT4_CREATE_TRANSLATION(QM_RESOURCES
85 #                                          ${PROJECT_SOURCES}
86 #                                          ${TEXT_RESOURCES}
87 #                                          OPTIONS -extensions cpp -no-recursive
88 #                                          )
89
90 #SET(PROJECT_AUTOMOC
91 #    ${CMAKE_CURRENT_BINARY_DIR}/ParametersPlugin_automoc.cpp
92 #)
93 # sources / moc wrappings
94 QT_WRAP_MOC(PROJECT_AUTOMOC ${PROJECT_MOC_HEADERS})
95
96
97 SOURCE_GROUP ("Generated Files" FILES ${PROJECT_AUTOMOC} ${QM_RESOURCES})
98 SOURCE_GROUP ("Resource Files" FILES ${TEXT_RESOURCES})
99
100 ADD_LIBRARY(ParametersPlugin MODULE
101             ${PROJECT_SOURCES}
102             ${PROJECT_HEADERS}
103             ${XML_RESOURCES}
104             ${TEXT_RESOURCES}
105             ${QM_RESOURCES}
106             ${PROJECT_AUTOMOC}
107 )
108
109
110 TARGET_LINK_LIBRARIES(ParametersPlugin ${PROJECT_LIBRARIES})
111
112 INSTALL(TARGETS ParametersPlugin DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
113 INSTALL(FILES ${XML_RESOURCES} ${TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})
114 INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES})
115
116 ADD_UNIT_TESTS(TestParameterCreation.py
117                TestParameterRename.py
118                TestParameterChangeValue.py
119                TestParameterDelete.py
120                TestParameterErrorMsg.py
121                TestParametersMgr.py
122                Test1806.py
123                Test2392.py
124                Test2474.py
125               )