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