Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDCouplingCorba_Swig / Client / CMakeLists.txt
1 # Copyright (C) 2007-2012  CEA/DEN, EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
21 FIND_PACKAGE(SWIG REQUIRED)
22 INCLUDE(${SWIG_USE_FILE})
23
24 SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES CPLUSPLUS ON)
25 SET_SOURCE_FILES_PROPERTIES(MEDCouplingClient.i PROPERTIES SWIG_DEFINITIONS "-shadow")
26
27 INCLUDE_DIRECTORIES(
28   ${PYTHON_INCLUDE_DIRS}
29   ${OMNIORB_INCLUDE_DIRS}
30   ${KERNEL_ROOT_DIR}/include/salome
31   ${CMAKE_CURRENT_BINARY_DIR}/../../../idl
32   ${CMAKE_CURRENT_SOURCE_DIR}
33   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCouplingCorba/Client
34   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling_Swig
35   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
36   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
37   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
38   )
39
40 SWIG_ADD_MODULE(MEDCouplingClient python MEDCouplingClient.i)
41 SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBRARIES} medcouplingclient)
42 SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
43
44 INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
45 INSTALL(FILES MEDCouplingClient.i DESTINATION ${MED_salomeinclude_HEADERS})
46 SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py)
47 INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})