Salome HOME
New CMake procedure.
[modules/kernel.git] / src / DSC / DSC_User / Datastream / Calcium / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D, OPEN CASCADE
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_DIRECTORIES(
21   ${Boost_INCLUDE_DIR}
22   ${OMNIORB_INCLUDE_DIR}
23   ${CMAKE_BINARY_DIR}
24   ${CMAKE_BINARY_DIR}/salome_adm
25   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User
26   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream
27   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Palm
28   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Datastream/Calcium
29   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_User/Basic
30   ${CMAKE_SOURCE_DIR}/src/DSC/DSC_Basic
31   ${CMAKE_SOURCE_DIR}/src/SALOMELocalTrace
32   ${CMAKE_SOURCE_DIR}/src/Basics
33   ${CMAKE_SOURCE_DIR}/src/Utils
34   ${CMAKE_SOURCE_DIR}/src/Container
35   ${CMAKE_SOURCE_DIR}/src/GenericObj
36   ${CMAKE_SOURCE_DIR}/src/Notification
37   ${CMAKE_BINARY_DIR}/idl
38   ${CMAKE_BINARY_DIR}/src/DSC/DSC_User/Datastream/Calcium
39 )
40
41 SET(SalomeCalcium_SOURCES
42   calcium_port_factory.cxx
43   calcium_uses_port.cxx
44   calcium_provides_port.cxx
45   calcium_repository_types.cxx
46   CalciumCouplingPolicy.cxx
47   CorbaTypes2CalciumTypes.cxx
48   CalciumCxxInterface.cxx
49   CalciumTypes2CorbaTypes.cxx
50   CalciumCInterface.cxx
51   CalciumProvidesPort.cxx
52   Calcium.cxx
53   calcium_destructors_port_uses.cxx
54 )
55
56 ADD_DEFINITIONS(${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS})
57
58 ADD_LIBRARY(SalomeCalcium ${SalomeCalcium_SOURCES})
59 TARGET_LINK_LIBRARIES(SalomeCalcium SalomeDSCSuperv SalomeContainer ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
60
61 INSTALL(TARGETS SalomeCalcium DESTINATION ${SALOME_INSTALL_LIBS})
62
63 SET(CalciumC_SOURCES
64   CalciumC.c
65   Calcium.cxx
66   calciumf.c
67 )
68 ADD_LIBRARY(CalciumC ${CalciumC_SOURCES})
69 TARGET_LINK_LIBRARIES(CalciumC SalomeDSCSuperv SalomeCalcium)
70
71 INSTALL(TARGETS CalciumC DESTINATION ${SALOME_INSTALL_LIBS})
72
73 ADD_EXECUTABLE(test_DataIdContainer_Calcium test_DataIdContainer.cxx)
74 TARGET_LINK_LIBRARIES(test_DataIdContainer_Calcium SalomeDSCSuperv SalomeContainer SalomeCalcium OpUtil SALOMELocalTrace ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS})
75
76 CONFIGURE_FILE(calcium_integer_port_uses.hxx.in calcium_integer_port_uses.hxx @ONLY)
77 CONFIGURE_FILE(CalciumProvidesPort.hxx.in CalciumProvidesPort.hxx @ONLY)
78 CONFIGURE_FILE(CalciumFortranInt.h.in CalciumFortranInt.h @ONLY)
79
80 SET(COMMON_HEADERS
81   Calcium.hxx
82   CalciumCInterface.hxx
83   CalciumCouplingPolicy.hxx
84   CalciumCxxInterface.hxx
85   CalciumException.hxx
86   CalciumGenericProvidesPort.hxx
87   CalciumGenericUsesPort.hxx
88   CalciumInterface.hxx
89   CalciumMacroCInterface.hxx
90   CalciumPortTraits.hxx
91   CalciumTypes.hxx
92   CalciumTypes2CorbaTypes.hxx
93   Copy2CorbaSpace.hxx
94   Copy2UserSpace.hxx
95   CorbaTypes2CalciumTypes.hxx
96   calcium_complex_port_uses.hxx
97   calcium_double_port_uses.hxx
98   calcium_intc_port_uses.hxx
99   calcium_logical_port_uses.hxx
100   calcium_long_port_uses.hxx
101   calcium_port_factory.hxx
102   calcium_provides_port.hxx
103   calcium_real_port_uses.hxx
104   calcium_string_port_uses.hxx
105   calcium_uses_port.hxx
106   calcium.h
107   calcium.hf
108   calciumE.h
109   calciumP.h
110   calciumf.h
111   fortoc.h
112   version.h
113   ${CMAKE_CURRENT_BINARY_DIR}/CalciumFortranInt.h
114   ${CMAKE_CURRENT_BINARY_DIR}/CalciumProvidesPort.hxx
115   ${CMAKE_CURRENT_BINARY_DIR}/calcium_integer_port_uses.hxx
116 )
117 INSTALL(FILES ${COMMON_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})