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 ADD_SUBDIRECTORY(Client)
23 FIND_PACKAGE(SWIG REQUIRED)
24 INCLUDE(${SWIG_USE_FILE})
26 SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES CPLUSPLUS ON)
27 SET_SOURCE_FILES_PROPERTIES(MEDCouplingCorba.i PROPERTIES SWIG_DEFINITIONS "-shadow")
29 SET(SWIG_MODULE_MEDCouplingCorba_EXTRA_FLAGS -DWITH_NUMPY)
32 SET(MEDCouplingCorba_SWIG_DPYS_FILES
33 MEDCouplingCorbaTypemaps.i)
36 ${PYTHON_INCLUDE_DIRS}
37 ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS}
38 ${KERNEL_ROOT_DIR}/include/salome
39 ${CMAKE_CURRENT_BINARY_DIR}/../../idl
40 ${CMAKE_CURRENT_SOURCE_DIR}
41 ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCouplingCorba
42 ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling_Swig
43 ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
44 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
45 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
48 # _ABR_ Ensure dependency mechanism on all SWIG files and headers
49 SET (SWIG_MODULE_MEDCouplingCorba_EXTRA_DEPS ${MEDCouplingCorba_SWIG_DPYS_FILES}
50 ${medcouplingcorba_HEADERS_HXX}
51 ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX}
52 ${interpkernel_HEADERS_HXX} ${interpkernel_HEADERS_TXX})
54 SWIG_ADD_MODULE(MEDCouplingCorba python MEDCouplingCorba.i)
55 SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBS} medcouplingcorba ${PLATFORM_LIBS})
56 SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${PYTHON_DEFINITIONS}")
58 SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingCorba_d)
61 INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${SALOME_INSTALL_PYTHON})
62 INSTALL(FILES MEDCouplingCorba.i MEDCouplingCorbaTypemaps.i DESTINATION ${SALOME_INSTALL_HEADERS})
63 SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py)
64 INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${SALOME_INSTALL_PYTHON})