Salome HOME
CMake:
[modules/yacs.git] / src / runtime / 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 IF(SALOME_BUILD_TESTS)
21   ADD_SUBDIRECTORY(Test)
22 ENDIF(SALOME_BUILD_TESTS)
23
24 # --- options ---
25
26 IF(SALOME_YACS_USE_KERNEL)
27   SET(SALOME_LIBS 
28     SalomeLifeCycleCORBA 
29     SalomeIDLKernel 
30     SalomeNS
31     SalomeContainer 
32     SALOMEBasics 
33     SalomeResourcesManager 
34     OpUtil 
35     SALOMELocalTrace 
36     Registry 
37     SalomeNotification 
38     ResourcesManager 
39     SalomeHDFPersist 
40     SalomeGenericObj
41     )
42   SET(SALOME_INCL_PATH ${KERNEL_INCLUDE_DIRS})
43
44   IF(SALOME_YACS_USE_DSC)
45     SET(DSC_LIBS SalomeDSCContainer)
46   ENDIF(SALOME_YACS_USE_DSC)
47 ENDIF(SALOME_YACS_USE_KERNEL)
48
49 # additional include directories
50 INCLUDE_DIRECTORIES(
51   ${OMNIORB_INCLUDE_DIR}
52   ${OMNIORB_ROOT_DIR}/include/omniORB4/internal
53   ${SALOME_INCL_PATH}
54   ${PROJECT_SOURCE_DIR}/src/bases
55   ${PROJECT_SOURCE_DIR}/src/engine
56   ${PROJECT_SOURCE_DIR}/idl
57   ${PROJECT_SOURCE_DIR}
58   ${PROJECT_BINARY_DIR}
59   ${PROJECT_BINARY_DIR}/idl
60   ${LIBXML2_INCLUDE_DIR}
61   ${PYTHON_INCLUDE_DIR}
62   )
63
64 # additional preprocessor / compiler flags
65 ADD_DEFINITIONS(
66   ${PYTHON_DEFINITIONS}
67   ${OMNIORB_DEFINITIONS}
68   )
69 IF(WIN32)
70   ADD_DEFINITIONS(-DNOGDI)
71 ENDIF(WIN32)
72
73 # libraries to link to
74 SET(_link_LIBRARIES
75   ${DSC_LIBS}
76   ${SALOME_LIBS}
77   ${OMNIORB_LIBRARIES}
78   ${PYTHON_LIBRARIES}
79   ${LIBXML2_LIBRARIES}
80   SalomeIDLYACS
81   YACSlibEngine
82   )
83
84 # --- headers ---
85
86 SET(YACSRuntimeSALOME_HEADERS
87   YACSRuntimeSALOMEExport.hxx 
88   CalStreamPort.hxx
89   CORBAComponent.hxx
90   CORBACORBAConv.hxx
91   CORBACppConv.hxx
92   CORBANeutralConv.hxx
93   CORBANode.hxx
94   CORBAPorts.hxx
95   CORBAPythonConv.hxx
96   CORBAXMLConv.hxx
97   CppComponent.hxx
98   CppContainer.hxx
99   CppCORBAConv.hxx
100   CppCppConv.hxx
101   CppNeutralConv.hxx
102   CppNode.hxx
103   CppPorts.hxx
104   CppPythonConv.hxx
105   CppXMLConv.hxx
106   NeutralCORBAConv.hxx
107   NeutralCppConv.hxx 
108   NeutralPythonConv.hxx
109   NeutralXMLConv.hxx
110   OutNode.hxx
111   PresetNode.hxx 
112   PresetPorts.hxx
113   PyStdout.hxx
114   PythonCORBAConv.hxx
115   PythonCppConv.hxx 
116   PythonNeutralConv.hxx
117   PythonNode.hxx
118   PythonPorts.hxx
119   PythonXMLConv.hxx 
120   RuntimeSALOME.hxx
121   SalomeComponent.hxx
122   SalomeContainer.hxx 
123   SALOMEDispatcher.hxx
124   SalomeProc.hxx
125   SalomePythonComponent.hxx
126   SalomePythonNode.hxx 
127   SessionCataLoader.hxx
128   StudyNodes.hxx
129   StudyPorts.hxx
130   TypeConversions.hxx 
131   VisitorSaveSalomeSchema.hxx
132   XMLCORBAConv.hxx
133   XMLCppConv.hxx
134   XMLNeutralConv.hxx 
135   XMLNode.hxx
136   XMLPorts.hxx
137   XMLPythonConv.hxx
138   PythonInitConv.hxx 
139   NeutralInitConv.hxx
140   SalomeOptimizerLoop.hxx
141   DistributedPythonNode.hxx
142   PyOptimizerAlg.hxx
143   )
144
145 # --- sources ---
146
147 SET(YACSRuntimeSALOME_SOURCES
148   TypeConversions.cxx            
149   CORBACORBAConv.cxx             
150   CORBAPythonConv.cxx            
151   CORBAXMLConv.cxx               
152   CORBANeutralConv.cxx           
153   XMLCORBAConv.cxx               
154   XMLPythonConv.cxx              
155   XMLNeutralConv.cxx             
156   CORBANode.cxx                  
157   CORBAPorts.cxx                 
158   CppNode.cxx                    
159   CppPorts.cxx                   
160   NeutralPythonConv.cxx          
161   NeutralCORBAConv.cxx           
162   NeutralXMLConv.cxx             
163   NeutralInitConv.cxx            
164   PythonCORBAConv.cxx            
165   PythonNeutralConv.cxx          
166   PythonXMLConv.cxx              
167   PythonInitConv.cxx             
168   PythonNode.cxx                 
169   SalomePythonNode.cxx           
170   DistributedPythonNode.cxx      
171   SalomePythonComponent.cxx      
172   SalomeContainer.cxx            
173   PythonPorts.cxx                
174   XMLNode.cxx                    
175   XMLPorts.cxx                   
176   RuntimeSALOME.cxx              
177   SALOMEDispatcher.cxx           
178   SalomeProc.cxx                 
179   CalStreamPort.cxx              
180   CORBAComponent.cxx             
181   SalomeComponent.cxx            
182   CppComponent.cxx               
183   CppContainer.cxx               
184   CppCORBAConv.cxx               
185   CppNeutralConv.cxx             
186   CppXMLConv.cxx                 
187   CppCppConv.cxx                 
188   CppPythonConv.cxx              
189   CORBACppConv.cxx               
190   NeutralCppConv.cxx             
191   XMLCppConv.cxx                 
192   PythonCppConv.cxx              
193   SessionCataLoader.cxx          
194   PresetPorts.cxx                
195   PresetNode.cxx                 
196   OutNode.cxx                    
197   StudyNodes.cxx                 
198   StudyPorts.cxx                 
199   VisitorSaveSalomeSchema.cxx    
200   PyStdout.cxx                   
201   SalomeOptimizerLoop.cxx        
202   PyOptimizerAlg.cxx             
203   )
204
205 # --- rules ---
206
207 ADD_LIBRARY(YACSRuntimeSALOME ${YACSRuntimeSALOME_SOURCES})
208 TARGET_LINK_LIBRARIES(YACSRuntimeSALOME ${_link_LIBRARIES})
209 INSTALL(TARGETS YACSRuntimeSALOME EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
210
211 INSTALL(FILES ${YACSRuntimeSALOME_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})