From 86509c792c7785426d6392dc0b839694f3b514c2 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 4 Jan 2019 15:53:10 +0100 Subject: [PATCH] Cmake stuff --- src/CMakeLists.txt | 1 + src/Laucher_SWIG/CMakeLists.txt | 46 +++++++++++++++++++++++++++++++++ src/Laucher_SWIG/Launcher.i | 32 +++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 src/Laucher_SWIG/CMakeLists.txt create mode 100644 src/Laucher_SWIG/Launcher.i diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef1cdb922..25b7dc6e8 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -41,6 +41,7 @@ SET(SUBDIR_CORBA SALOMESDS TestContainer Launcher + Laucher_SWIG LifeCycleCORBA LifeCycleCORBA_SWIG SALOMEDSClient diff --git a/src/Laucher_SWIG/CMakeLists.txt b/src/Laucher_SWIG/CMakeLists.txt new file mode 100644 index 000000000..096e83eec --- /dev/null +++ b/src/Laucher_SWIG/CMakeLists.txt @@ -0,0 +1,46 @@ +# Copyright (C) 2019 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, 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. +# +# 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 +# + +INCLUDE(${SWIG_USE_FILE}) + +ADD_DEFINITIONS(${PYTHON_DEFINITIONS}) + +SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES CPLUSPLUS ON) +SET_SOURCE_FILES_PROPERTIES(Launcher.i PROPERTIES SWIG_FLAGS "-py3") + + +INCLUDE_DIRECTORIES( + ${PYTHON_INCLUDE_DIRS} + ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager + ${CMAKE_CURRENT_SOURCE_DIR}/../Launcher + ) + +SET(Launcher_target_name pylauncher) + +SWIG_ADD_LIBRARY(${Launcher_target_name} LANGUAGE python SOURCES Launcher.i) + +SWIG_LINK_LIBRARIES(${Launcher_target_name} ${PYTHON_LIBRARIES} ${PLATFORM_LIBS} Launcher) + +SWIG_CHECK_GENERATION(${Launcher_target_name}) + +INSTALL(TARGETS ${SWIG_MODULE_${Launcher_target_name}_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON}) + +SET(PYFILES_TO_INSTALL ${PYFILES_TO_INSTALL} ${CMAKE_CURRENT_BINARY_DIR}/pylauncher.py) + +SALOME_INSTALL_SCRIPTS("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_${Launcher_target_name}_REAL_NAME}") diff --git a/src/Laucher_SWIG/Launcher.i b/src/Laucher_SWIG/Launcher.i new file mode 100644 index 000000000..99e176e62 --- /dev/null +++ b/src/Laucher_SWIG/Launcher.i @@ -0,0 +1,32 @@ +// Copyright (C) 2019 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, 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. +// +// 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 +// + +%module pylauncher + +%{ +#include "SALOME_ResourcesCatalog_Parser.hxx" +%} + +class ParserResourcesType +{ +public: + ParserResourcesType(); + ~ParserResourcesType(); + std::string getAccessProtocolTypeStr() const; +}; -- 2.39.2