-# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2015 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/SalomeMacros.cmake)
+INCLUDE(UsePyQt)
-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
+PYQT_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
+ dockwidgets.py
)
-SALOME_INSTALL_SCRIPTS("${mypkgpython_PYTHON}" ${SALOME_INSTALL_PYTHON}/salome/gui)
-
-SET(PYUIC_FILES
- SelectVarsDialog_ui.py
- genericdialog_ui.py
- mytestdialog_ui.py
+SET(_bin_SCRIPTS
+ test_dockwidgets.py
)
-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})
+# scripts / to install
+
+SET(_all_SCRIPTS ${_other_SCRIPTS} ${_pyuic_SCRIPTS})
+
+# --- rules ---
+
+SALOME_INSTALL_SCRIPTS("${_all_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/gui)
+SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_DATA})