1 # Copyright (C) 2012 EDF
3 # This file is part of SALOME PARAMETRIC module.
5 # SALOME PARAMETRIC module is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # SALOME PARAMETRIC module is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with SALOME PARAMETRIC module. If not, see <http://www.gnu.org/licenses/>.
18 SET(PYUIC_FILES wizard_ui.py varrange_ui.py execparams_ui.py)
19 SET(INSTALL_DIR ${PYTHONDIR}/salome/parametric/gui)
21 FOREACH(OUTPUT ${PYUIC_FILES})
22 STRING(REPLACE "_ui.py" ".ui" INPUT ${OUTPUT})
23 SET(INPUT ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT})
24 SET(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT})
25 ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT}
26 COMMAND ${PYUIC_EXECUTABLE} -o ${OUTPUT} ${INPUT}
27 MAIN_DEPENDENCY ${INPUT}
29 INSTALL(FILES ${OUTPUT} DESTINATION ${INSTALL_DIR})
30 ENDFOREACH(OUTPUT ${PYUIC_FILES})
32 ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES})