1 # Copyright (C) 2009-2016 EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 from string import Template
23 from module_generator.compat import Template,set
25 # SalomeApp.xml file for a python gui.
26 # template parameters:
27 # module : module name
28 # lmodule : module name in lower case
29 # version : version number of the module
32 <section name="${module}">
33 <parameter name="name" value="${module}"/>
34 <parameter name="icon" value="${module}.png"/>
35 <parameter name="library" value="SalomePyQtGUI"/>
36 <parameter name="documentation" value="${lmodule}_help"/>
37 <parameter name="version" value="${version}"/>
39 <section name="resources">
40 <parameter name="${module}" value="$${${module}_ROOT_DIR}/share/salome/resources/${lmodule}"/>
42 <section name="${lmodule}_help" >
43 <parameter name="sub_menu" value="%1 module"/>
44 <parameter name="User's Guide" value="%${module}_ROOT_DIR%/share/doc/salome/gui/${lmodule}/index.html"/>
48 pysalomeapp=Template(pysalomeapp)
50 # SalomeApp.xml file for a cpp gui.
51 # template parameters:
52 # module : module name
53 # lmodule : module name in lower case
54 # version : version number of the module
57 <section name="${module}">
58 <parameter name="name" value="${module}"/>
59 <parameter name="icon" value="${module}.png"/>
60 <parameter name="documentation" value="${lmodule}_help"/>
61 <parameter name="version" value="${version}"/>
63 <section name="resources">
64 <parameter name="${module}" value="$${${module}_ROOT_DIR}/share/salome/resources/${lmodule}"/>
66 <section name="${lmodule}_help" >
67 <parameter name="sub_menu" value="%1 module"/>
68 <parameter name="User's Guide" value="%${module}_ROOT_DIR%/share/doc/salome/gui/${lmodule}/index.html"/>
72 cppsalomeapp=Template(cppsalomeapp)
74 # CMakeLists.txt for a c++ GUI of the module (src/{module}GUI/CMakeLists.txt)
75 # template parameters:
76 # module : module name
77 # include_dirs : additional include directories
78 # libs : libraries to link to
79 # uic_files : .ui files
80 # moc_headers : header files - to be processed by moc
82 # resources : resource files
83 # ts_resources : .ts files - to be processed by lrelease
88 # additional include directories
91 $${OMNIORB_INCLUDE_DIR}
92 $${KERNEL_INCLUDE_DIRS}
94 $${PROJECT_BINARY_DIR}/idl
98 # additional preprocessor / compiler flags
101 $${OMNIORB_DEFINITIONS}
102 $${KERNEL_DEFINITIONS}
106 # libraries to link to
115 # resource files / to be processed by uic
122 # header files / to be processed by moc
127 # header files / uic wrappings
128 QT_WRAP_UIC(_uic_HEADERS $${_uic_files})
132 # sources / moc wrappings
133 QT_WRAP_MOC(_moc_SOURCES $${_moc_HEADERS})
140 # sources / to compile
141 SET(${module}GUI_SOURCES
149 # resource files / to be processed by lrelease
161 ADD_LIBRARY(${module} $${${module}GUI_SOURCES})
162 TARGET_LINK_LIBRARIES(${module} $${_link_LIBRARIES} )
163 INSTALL(TARGETS ${module} EXPORT $${PROJECT_NAME}TargetGroup DESTINATION $${SALOME_INSTALL_LIBS})
165 INSTALL(FILES $${_moc_HEADERS} DESTINATION $${SALOME_INSTALL_HEADERS})
166 INSTALL(FILES $${_res_files} DESTINATION "$${SALOME_${module}_INSTALL_RES_DATA}")
167 QT_INSTALL_TS_RESOURCES("$${_ts_files}" "$${SALOME_${module}_INSTALL_RES_DATA}")
169 cmake_cpp_gui = Template(cmake_cpp_gui)
171 # CMakeLists.txt for a python GUI (src/{module}GUI/CMakeLists.txt)
172 # template parameters:
173 # module : module name
174 # scripts : .py files
175 # ts_resources : .ts files - to be processed by lrelease
176 # resources : other resource files
180 # additional include directories
194 # resource files / to be processed by lrelease
206 SALOME_INSTALL_SCRIPTS("$${_bin_SCRIPTS}" $${SALOME_INSTALL_SCRIPT_PYTHON})
207 INSTALL(FILES $${_res_files} DESTINATION "$${SALOME_${module}_INSTALL_RES_DATA}")
208 QT_INSTALL_TS_RESOURCES("$${_ts_RESOURCES}" "$${SALOME_${module}_INSTALL_RES_DATA}")
210 cmake_py_gui = Template(cmake_py_gui)