X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2FCMakeLists.txt;h=cf465962e908d3ad2236ebb955e3d83eab7b72f7;hb=HEAD;hp=07cbf93b103f0c5bd7455f8bf9770315bbe4d2c3;hpb=683b9e264c22c081ba5cf3c20639480d03d1d994;p=modules%2Fsmesh.git diff --git a/src/Tools/ZCracksPlug/CMakeLists.txt b/src/Tools/ZCracksPlug/CMakeLists.txt index 07cbf93b1..cf465962e 100644 --- a/src/Tools/ZCracksPlug/CMakeLists.txt +++ b/src/Tools/ZCracksPlug/CMakeLists.txt @@ -1,9 +1,9 @@ -# Copyright (C) 2012-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2024 EDF # # 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 @@ -17,17 +17,57 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +ADD_SUBDIRECTORY(casTests) +IF(SALOME_BUILD_GUI) + INCLUDE(UsePyQt) +ENDIF(SALOME_BUILD_GUI) # --- scripts --- # scripts / static -SET(plugin_SCRIPTS - zcracks_plugin.py +SET(_plugin_SCRIPTS + __init__.py + ellipse.py + genereCrack.py + main.py + output.py + rectangle.py + sphere.py + utilityFunctions.py + zcracks_plugin.py + Zset.py ) +SET(_command_SCRIPTS + zcracksLaunch.py +) + +IF(SALOME_BUILD_GUI) + # uic files / to be processed by pyuic + SET(_pyuic_FILES + zcracks.ui + ) + +# qrc files / to be processed by pyrcc +SET(_pyqrc_FILES + images.qrc +) + + # scripts / pyuic wrappings + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic OPTIONS "--import-from=Zcracks" "--resource-suffix=_qrc") + PYQT_WRAP_QRC(_pyqrc_SCRIPTS ${_pyqrc_FILES}) +ENDIF(SALOME_BUILD_GUI) # --- rules --- -SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}) +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) + SALOME_INSTALL_SCRIPTS("${_pyqrc_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) + # 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)