Salome HOME
merge from BR_KERNEL_REFACTORING
[modules/kernel.git] / src / DSC / DSC_Python / CMakeLists.txt
1 # Copyright (C) 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 FIND_PACKAGE(SWIG REQUIRED)
21 INCLUDE(${SWIG_USE_FILE})
22
23 SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
24 SET(CMAKE_SWIG_FLAGS "-noexcept")
25 SET_SOURCE_FILES_PROPERTIES(calciumPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
26
27 INCLUDE_DIRECTORIES(
28   ${OMNIORB_INCLUDE_DIRS}
29   ${PYTHON_INCLUDE_DIRS}
30   ${BOOST_INCLUDE_DIRS}
31   ${CMAKE_BINARY_DIR}/salome_adm
32   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
33   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
34   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
35   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
36   ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
37   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic
38   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
39   ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
40   ${CMAKE_SOURCE_DIR}/src/Basics
41   ${CMAKE_SOURCE_DIR}/src/Utils
42   ${CMAKE_SOURCE_DIR}/src/Container
43   ${CMAKE_SOURCE_DIR}/src/GenericObj
44   ${CMAKE_SOURCE_DIR}/src/Notification
45   ${CMAKE_BINARY_DIR}/idl
46   )
47
48 SET(_calcium_LIBS
49   CalciumC
50   SalomeDatastream
51   SalomeDSCSupervBasic
52   SalomeDSCSuperv
53   SalomeDSCContainer
54   SalomeContainer
55   ${CORBA_LIBS}
56 )
57
58 SWIG_ADD_MODULE(calcium python calcium.i)
59 SWIG_LINK_LIBRARIES(calcium ${_calcium_LIBS})
60 SET_TARGET_PROPERTIES(_calcium PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${BOOST_DEFINITIONS}")
61 INSTALL(TARGETS _calcium DESTINATION ${KERNEL_salomepythondir})
62
63 SET(SCRIPTS
64   dsccalcium.py
65 )
66 SALOME_INSTALL_SCRIPTS( ${SCRIPTS} ${KERNEL_salomepythondir})
67 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/calcium.py DESTINATION ${KERNEL_salomepythondir})