- Add direct dependencies between targets generated by PYQT_WRAP_UIC and SALOME_INSTALL_SCRIPTS macros to avoid races problem
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+
IF(SALOME_BUILD_DOC)
ADD_SUBDIRECTORY(doc)
ENDIF(SALOME_BUILD_DOC)
-INCLUDE(UsePyQt)
+IF(SALOME_BUILD_GUI)
+ INCLUDE(UsePyQt)
+ENDIF(SALOME_BUILD_GUI)
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
MGCleanerMonPlugDialog.py
MGCleanerMonViewText.py
MGCleanerplug_plugin.py
)
-# --- resources ---
-
-# uic files / to be processed by pyuic
-SET(_pyuic_files
- MGCleanerPlugDialog.ui
- MGCleanerViewText.ui
-)
-
-# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+IF(SALOME_BUILD_GUI)
+ # uic files / to be processed by pyuic
+ SET(_pyuic_FILES
+ MGCleanerPlugDialog.ui
+ MGCleanerViewText.ui
+ )
+ # scripts / pyuic wrappings
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
+ENDIF(SALOME_BUILD_GUI)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
IF(SALOME_BUILD_GUI)
- SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
-ENDIF(SALOME_BUILD_GUI)
\ No newline at end of file
+ SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS} TARGET_NAME _target_name_pyuic_py)
+ # add dependency of compiled py files on uic files in order
+ # to avoid races problems when compiling in parallel
+ ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
+ENDIF(SALOME_BUILD_GUI)
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
meshcut_plugin.py
)
)
IF(SALOME_BUILD_GUI)
- # --- resources ---
-
# uic files / to be processed by pyuic
- SET(_pyuic_files
+ SET(_pyuic_FILES
MeshCutDialog.ui
)
-
# scripts / pyuic wrappings
- PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
-
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
ENDIF(SALOME_BUILD_GUI)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
ADD_EXECUTABLE(MeshCut ${MeshCut_SOURCES})
TARGET_LINK_LIBRARIES(MeshCut ${_link_LIBRARIES})
INSTALL(TARGETS MeshCut EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
IF(SALOME_BUILD_GUI)
- INSTALL(FILES ${_pyuic_SCRIPTS} DESTINATION ${SALOME_INSTALL_BINS})
+ SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_BINS} TARGET_NAME _target_name_pyuic_py)
+ # add dependency of compiled py files on uic files in order
+ # to avoid races problems when compiling in parallel
+ ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
ENDIF(SALOME_BUILD_GUI)
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
maFenetreChoix.py
monEditor.py
monNomBase.py
__init__.py
)
-# --- resources ---
-
# uic files / to be processed by pyuic
-SET(_pyuic_files
+SET(_pyuic_FILES
desFenetreChoix.ui
desStat.ui
myMainTotale.ui
nomBase.ui
tousLesJobs.ui
)
-
# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui)
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui)
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui)
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/Verima/Gui TARGET_NAME _target_name_pyuic_py)
+# add dependency of compiled py files on uic files in order
+# to avoid races problems when compiling in parallel
+ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
ADD_SUBDIRECTORY(doc)
ENDIF(SALOME_BUILD_DOC)
-INCLUDE(UsePyQt)
+IF(SALOME_BUILD_GUI)
+ INCLUDE(UsePyQt)
+ENDIF(SALOME_BUILD_GUI)
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
monYamsPlugDialog.py
monViewText.py
yamsplug_plugin.py
)
-# --- resources ---
-
-# uic files / to be processed by pyuic
-SET(_pyuic_files
- YamsPlugDialog.ui
- ViewText.ui
-)
-
-# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+IF(SALOME_BUILD_GUI)
+ # uic files / to be processed by pyuic
+ SET(_pyuic_FILES
+ YamsPlugDialog.ui
+ ViewText.ui
+ )
+ # scripts / pyuic wrappings
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
+ENDIF(SALOME_BUILD_GUI)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS})
\ No newline at end of file
+IF(SALOME_BUILD_GUI)
+ SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS} TARGET_NAME _target_name_pyuic_py)
+ # add dependency of compiled py files on uic files in order
+ # to avoid races problems when compiling in parallel
+ ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
+ENDIF(SALOME_BUILD_GUI)
ADD_SUBDIRECTORY(casTests)
-INCLUDE(UsePyQt)
+IF(SALOME_BUILD_GUI)
+ INCLUDE(UsePyQt)
+ENDIF(SALOME_BUILD_GUI)
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
__init__.py
ellipse.py
genereCrack.py
Zset.py
)
-SET(command_SCRIPTS
+SET(_command_SCRIPTS
zcracksLaunch.py
)
-# --- resources ---
-
-# uic files / to be processed by pyuic
-SET(_pyuic_files
- zcracks.ui
-)
-
-# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+IF(SALOME_BUILD_GUI)
+ # uic files / to be processed by pyuic
+ SET(_pyuic_FILES
+ zcracks.ui
+ )
+ # scripts / pyuic wrappings
+ PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
+ENDIF(SALOME_BUILD_GUI)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks)
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks)
-SALOME_INSTALL_SCRIPTS("${command_SCRIPTS}" ${SALOME_INSTALL_BINS})
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks)
+SALOME_INSTALL_SCRIPTS("${_command_SCRIPTS}" ${SALOME_INSTALL_BINS})
+IF(SALOME_BUILD_GUI)
+ SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks TARGET_NAME _target_name_pyuic_py)
+ # add dependency of compiled py files on uic files in order
+ # to avoid races problems when compiling in parallel
+ ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
+ENDIF(SALOME_BUILD_GUI)
+
# --- scripts ---
# scripts / static
-SET(plugin_SCRIPTS
+SET(_plugin_SCRIPTS
__init__.py
fissureCoude_ihm.py
fissureCoude_plugin.py
dialogFissureCoude.dic
)
-# --- resources ---
-
# uic files / to be processed by pyuic
-SET(_pyuic_files
+SET(_pyuic_FILES
fissureCoude.ui
fissureGenerale.ui
)
-
# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
+SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm TARGET_NAME _target_name_pyuic_py)
+# add dependency of compiled py files on uic files in order
+# to avoid races problems when compiling in parallel
+ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
# --- scripts ---
# scripts / static
-SET(py_SCRIPTS
+SET(_py_SCRIPTS
__init__.py
plugindialog.py
inputdialog.py
# --- resources ---
# uic files / to be processed by pyuic
-SET(spadderpy_DATA
+SET(_spadderpy_DATA
parameters.png
input.png
select.png
steelbar.png
)
-SET(_pyuic_files
+SET(_pyuic_FILES
plugindialog.ui
inputframe.ui
)
# scripts / pyuic wrappings
-PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic)
# --- rules ---
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)
-SALOME_INSTALL_SCRIPTS("${py_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)
-INSTALL(FILES ${spadderpy_DATA} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui TARGET_NAME _target_name_pyuic_py)
+# add dependency of compiled py files on uic files in order
+# to avoid races problems when compiling in parallel
+ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic})
+
+SALOME_INSTALL_SCRIPTS("${_py_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)
+
+INSTALL(FILES ${_spadderpy_DATA} DESTINATION ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)