1 # Copyright (C) 2012-2013 CEA/DEN, EDF R&D
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author : Anthony Geay (CEA/DEN)
21 INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
22 FIND_PACKAGE(SWIG REQUIRED)
23 INCLUDE(${SWIG_USE_FILE})
25 SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES CPLUSPLUS ON)
26 SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_DEFINITIONS "-shadow")
28 SET(SWIG_MODULE_MEDCouplingClient_EXTRA_FLAGS -DWITH_NUMPY)
32 ${PYTHON_INCLUDE_DIRS}
33 ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
34 ${KERNEL_ROOT_DIR}/include/salome
35 ${CMAKE_CURRENT_BINARY_DIR}/../../../idl
36 ${CMAKE_CURRENT_SOURCE_DIR}
37 ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCouplingCorba/Client
38 ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling_Swig
39 ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
40 ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
41 ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
44 SWIG_ADD_MODULE(MEDCouplingClient python MEDCouplingClient.i)
45 SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBS} medcouplingclient)
46 SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${PYTHON_DEFINITIONS}")
47 IF(${MACHINE} STREQUAL WINDOWS)
48 SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingClient_d)
49 ENDIF(${MACHINE} STREQUAL WINDOWS)
51 INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
52 INSTALL(FILES MEDCouplingClient.i DESTINATION ${MED_salomeinclude_HEADERS})
53 SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py)
54 INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})