Salome HOME
Merge from BR_LIBBATCH_2_0
[modules/kernel.git] / idl / CMakeLists.txt
1 # Copyright (C) 2012  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(${CMAKE_SOURCE_DIR}/salome_adm/cmake_files/UseOMNIORB.cmake)
21
22 INCLUDE_DIRECTORIES(
23   ${OMNIORB_INCLUDE_DIR}
24   ${CMAKE_CURRENT_BINARY_DIR}
25 )
26
27 CONFIGURE_FILE(Calcium_Ports.idl.in Calcium_Ports.idl @ONLY)
28
29 SET(SalomeIDLKernel_IDLSOURCES
30   SALOME_Exception.idl
31   SALOME_Comm.idl
32   SALOME_ModuleCatalog.idl
33   SALOME_ResourcesManager.idl
34   SALOME_Launcher.idl
35   SALOMEDS.idl
36   SALOMEDS_Attributes.idl
37   SALOME_Component.idl
38   SALOME_ContainerManager.idl
39   SALOME_Registry.idl
40   Logger.idl
41   SALOME_GenericObj.idl
42   SALOME_Types.idl
43   SALOME_Session.idl
44   nstest.idl
45   DSC_Engines.idl
46   SALOME_Ports.idl
47   SALOME_PyNode.idl
48   Palm_Ports.idl
49   SALOME_PACOExtension.idl
50   SALOME_ParamPorts.idl
51   SALOME_Parametric.idl
52   SALOME_MPIObject.idl
53   SALOME_TestComponent.idl
54   SALOME_TestModuleCatalog.idl
55   ${CMAKE_CURRENT_BINARY_DIR}/Calcium_Ports.idl
56 )
57
58 IF(SALOME_USE_MPI)
59   SET(SalomeIDLKernel_IDLSOURCES ${SalomeIDLKernel_IDLSOURCES} SALOME_MPIContainer.idl SALOME_TestMPIComponent.idl)
60 ENDIF(SALOME_USE_MPI)
61
62 SET(IDL_INCLUDE_DIRS
63   ${CMAKE_CURRENT_SOURCE_DIR}
64   ${CMAKE_CURRENT_BINARY_DIR}
65 )
66
67 SET(COMMON_FLAGS ${OMNIORB_DEFINITIONS})
68 SET(TYPE)
69 IF(WINDOWS)
70   SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
71   SET(TYPE STATIC)
72 ELSE(WINDOWS)
73   SET(TYPE SHARED)
74 ENDIF(WINDOWS)
75
76 OMNIORB_ADD_MODULE(SalomeIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}" ${TYPE})
77 ADD_DEFINITIONS(${COMMON_FLAGS})
78 TARGET_LINK_LIBRARIES(SalomeIDLKernel ${OMNIORB_LIBRARIES})
79
80 INSTALL(TARGETS SalomeIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
81
82 IF(WITH_PACO_PARALLEL)
83   SET(SalomeParallelIDLKernel_IDLSOURCES
84     SALOME_ComponentPaCO.idl
85     SALOME_PortsPaCO.idl
86     DSC_EnginesPaCO.idl
87     SALOME_ParamPortsPaCO.idl
88     SALOME_PACOExtensionPaCO.idl
89     SALOME_GenericObjPaCO.idl
90   )
91   OMNIORB_ADD_MODULE(SalomeParallelIDLKernel "${SalomeIDLKernel_IDLSOURCES}" "${IDL_INCLUDE_DIRS}")
92   TARGET_LINK_LIBRARIES(SalomeParallelIDLKernel ${OMNIORB_LIBRARIES})
93
94   INSTALL(TARGETS SalomeParallelIDLKernel DESTINATION ${KERNEL_salomelib_LIBS})
95 ENDIF(WITH_PACO_PARALLEL)