X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPV_SWIG%2FCMakeLists.txt;h=e77b077a950118c1cbeaf323c4293451593a198f;hb=4095225705684389c98367e7ba154be482dfd468;hp=4c71092354b955b390472cb07d0ba15d07046c56;hpb=45730a713833b123768d9e895d06ffd86bca71d0;p=modules%2Fparavis.git diff --git a/src/PV_SWIG/CMakeLists.txt b/src/PV_SWIG/CMakeLists.txt index 4c710923..e77b077a 100644 --- a/src/PV_SWIG/CMakeLists.txt +++ b/src/PV_SWIG/CMakeLists.txt @@ -1,123 +1,38 @@ - - SET(VERSION_INFO 0.0.0) - SET(SOVERSION_INFO 0) - SET(SUBDIRS) - SET(AM_CPPFLAGS) - SET(AM_CXXFLAGS) - SET(LDADD) - - - SET(AM_CPPFLAGS ${AM_CPPFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) - SET(AM_CXXFLAGS ${AM_CXXFLAGS} -DHAVE_SALOME_CONFIG -I${KERNEL_ROOT_DIR}/include/salome -include SALOMEconfig.h) - -# Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # -# 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. +# 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, 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 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. # -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# VISU VISU_SWIG : binding of C++ implementation and Python -# File : Makefile.am -# Author : Paul RASCLE, EDF -# Module : VISU -# -# include $(top_srcdir)/adm_local/unix/make_common_starter.am - -SET(dist_salomescript_DATA - paravis.py - paravisSM.py - pvsimple.py -) - - - - FOREACH(dir ${SUBDIRS}) - IF(NOT dir STREQUAL .) - ADD_SUBDIRECTORY(${dir}) - ENDIF(NOT dir STREQUAL .) - ENDFOREACH(dir ${SUBDIRS}) - -FOREACH(f ${dist_salomescript_DATA}) - SET(DEST bin/salome) - +SET(_PYFILES_TO_INSTALL) - STRING(COMPARE EQUAL ${f} SALOMEconfig.h.in test_SALOMEconfig.h.in) - IF(test_SALOMEconfig.h.in) - INSTALL(FILES SALOMEconfig.ref.in DESTINATION ${DEST} RENAME SALOMEconfig.h.in) - ELSE(test_SALOMEconfig.h.in) - SET(dummy dummy-NOTFOUND) - MARK_AS_ADVANCED(dummy) - # FILE(REMOVE ${CMAKE_INSTALL_PREFIX}/${DEST}/${f}) - FIND_FILE(dummy ${f} PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH) - IF(dummy) - - - GET_FILENAME_COMPONENT(ext ${f} EXT) - IF(ext STREQUAL .py) - IF(DEST STREQUAL bin/salome) - SET(PERMS) - SET(PERMS ${PERMS} OWNER_READ OWNER_WRITE OWNER_EXECUTE) - SET(PERMS ${PERMS} GROUP_READ GROUP_EXECUTE) - SET(PERMS ${PERMS} WORLD_READ WORLD_EXECUTE) - INSTALL(FILES ${f} DESTINATION ${DEST} PERMISSIONS ${PERMS}) - ELSE(DEST STREQUAL bin/salome) - INSTALL(FILES ${f} DESTINATION ${DEST}) - ENDIF(DEST STREQUAL bin/salome) - ELSE(ext STREQUAL .py) - INSTALL(FILES ${f} DESTINATION ${DEST}) - ENDIF(ext STREQUAL .py) - - - ELSE(dummy) - GET_FILENAME_COMPONENT(ext ${f} EXT) - IF(ext STREQUAL .qm) - STRING(REGEX REPLACE .qm .ts input ${f}) - - - SET(input ${CMAKE_CURRENT_SOURCE_DIR}/resources/${input}) - - - SET(output ${CMAKE_CURRENT_BINARY_DIR}/${f}) - # ADD_CUSTOM_COMMAND( - # OUTPUT ${output} - # COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output} - # MAIN_DEPENDENCY ${input} - # ) - EXECUTE_PROCESS(COMMAND ${QT_LRELEASE_EXECUTABLE} ${input} -qm ${output}) - ENDIF(ext STREQUAL .qm) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${f} DESTINATION ${DEST}) - ENDIF(dummy) - ENDIF(test_SALOMEconfig.h.in) - - - GET_FILENAME_COMPONENT(ext ${f} EXT) - IF(ext STREQUAL .py) - INSTALL(CODE "SET(PYTHON_FILE ${f})") - INSTALL(CODE "SET(CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})") - INSTALL(CODE "SET(DEST ${DEST})") - INSTALL(CODE "SET(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})") - - - STRING(REPLACE "\\" "/" KERNEL_ROOT_DIR ${KERNEL_ROOT_DIR}) - INSTALL(SCRIPT ${KERNEL_ROOT_DIR}/salome_adm/cmake_files/install_and_compile_python_file.cmake) - - - ENDIF(ext STREQUAL .py) - -ENDFOREACH(f ${dist_salomescript_DATA}) +IF(SALOME_LIGHT_ONLY) + LIST(APPEND _PYFILES_TO_INSTALL + pvsimple.py + presentations.py + ) +ELSE(SALOME_LIGHT_ONLY) + # Use a set of Python files redirecting the API directly + # to the original ParaView modules. + LIST(APPEND _PYFILES_TO_INSTALL + pvserver.py + pvsimple.py + presentations.py + paravisSM.py + ) +ENDIF(SALOME_LIGHT_ONLY) + +SALOME_INSTALL_SCRIPTS("${_PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON})