X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGUI_PY%2FCMakeLists.txt;h=0618970886352ec96d1e356e7e8e44d56f04e51b;hb=6f75b0c075ffb1dc9b36df5d9b000b3b9f18ac36;hp=09abae1654adf9301a98a1a8b62f99f934979208;hpb=95d09d48a30f08befd46da420c02e9732891c743;p=modules%2Fgui.git diff --git a/src/GUI_PY/CMakeLists.txt b/src/GUI_PY/CMakeLists.txt index 09abae165..061897088 100755 --- a/src/GUI_PY/CMakeLists.txt +++ b/src/GUI_PY/CMakeLists.txt @@ -17,40 +17,36 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake) +INCLUDE(UsePyQt4) -INCLUDE_DIRECTORIES( - ${CMAKE_CURRENT_BINARY_DIR} +# --- resources --- + +# uic files / to be processed by pyuic +SET(_pyuic_files + SelectVarsDialog.ui + genericdialog.ui + mytestdialog.ui ) -# Python modules to be installed -SET(mypkgpython_PYTHON + +# --- scripts --- + +# scripts / pyuic wrappings + +PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files}) + +# scripts / static +SET(_other_SCRIPTS __init__.py - selectvars.py genericdialog.py - mytestdialog.py helper.py + mytestdialog.py + selectvars.py ) -SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/gui) -SET(PYUIC_FILES - SelectVarsDialog_ui.py - genericdialog_ui.py - mytestdialog_ui.py -) +# scritps / to install + +SET(_all_SCRIPTS ${_other_SCRIPTS} ${_pyuic_SCRIPTS}) + +# --- rules --- -FOREACH(output ${PYUIC_FILES}) - STRING(REPLACE "_ui.py" ".ui" input ${output}) - SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${input}) - SET(output ${CMAKE_CURRENT_BINARY_DIR}/${output}) - ADD_CUSTOM_COMMAND( - OUTPUT ${output} - COMMAND ${PYQT_PYUIC_EXECUTABLE} -o ${output} ${input} - MAIN_DEPENDENCY ${input} - ) -ENDFOREACH(output ${PYUIC_FILES}) - -ADD_CUSTOM_TARGET(BUILD_PY_UI_FILES ALL DEPENDS ${PYUIC_FILES}) - -FOREACH(output ${PYUIC_FILES}) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${output} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/gui) -ENDFOREACH(output ${PYUIC_FILES}) +SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/gui)