]> SALOME platform Git repositories - modules/yacs.git/blob - src/yacsloader/CMakeLists.txt
Salome HOME
Deleted deprecated code
[modules/yacs.git] / src / yacsloader / CMakeLists.txt
1 # Copyright (C) 2012-2016  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, or (at your option) any later version.
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   ADD_SUBDIRECTORY(pmml)  
23 ENDIF(SALOME_BUILD_TESTS)
24
25 # --- options ---
26
27 IF(SALOME_YACS_USE_KERNEL)
28   INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS})
29   ADD_DEFINITIONS(${KERNEL_DEFINITIONS})
30
31   SET(SALOME_LIBS 
32     ${KERNEL_SalomeLifeCycleCORBA}
33     ${KERNEL_SalomeIDLKernel}
34     ${KERNEL_SalomeNS}
35     ${KERNEL_SalomeContainer}
36     ${KERNEL_SALOMEBasics}
37     ${KERNEL_SalomeResourcesManager}
38     ${KERNEL_OpUtil}
39     ${KERNEL_SALOMELocalTrace}
40     ${KERNEL_Registry}
41     ${KERNEL_SalomeNotification}
42     ${KERNEL_ResourcesManager}
43     ${KERNEL_SalomeHDFPersist}
44     ${KERNEL_SalomeGenericObj}
45     )
46   IF(SALOME_YACS_USE_DSC)
47     LIST(APPEND SALOME_LIBS ${KERNEL_SalomeDSCContainer})
48   ENDIF(SALOME_YACS_USE_DSC)
49 ENDIF(SALOME_YACS_USE_KERNEL)
50
51 # additional include directories
52 INCLUDE_DIRECTORIES(
53   ${OMNIORB_INCLUDE_DIR}
54   ${PYTHON_INCLUDE_DIR}
55   ${PROJECT_SOURCE_DIR}/src/bases
56   ${PROJECT_SOURCE_DIR}/src/engine
57   ${PROJECT_SOURCE_DIR}/src/runtime
58   ${PROJECT_SOURCE_DIR}/src/yacsloader
59   ${PROJECT_SOURCE_DIR}
60   )
61
62 # additional preprocessor / compiler flags
63 ADD_DEFINITIONS(
64   ${PYTHON_DEFINITIONS}
65   ${OMNIORB_DEFINITIONS}
66   )
67 SET(_exec_DEFINITIONS
68   -g
69   )
70
71 # libraries to link to
72 SET(YACSloader_LIBRARIES
73   ${OMNIORB_LIBRARIES}
74   ${LIBXML2_LIBRARIES}
75   YACSlibEngine
76   )
77 SET(_link_LIBRARIES
78   YACSloader
79   YACSRuntimeSALOME
80   YACSlibEngine
81   ${SALOME_LIBS}
82   ${OMNIORB_LIBRARIES}
83   ${PYTHON_LIBRARIES}
84   ${LIBXML2_LIBRARIES}
85   )
86
87 # --- headers ---
88
89 SET(YACSloader_HEADERS
90   YACSloaderExport.hxx
91   blocParsers.hxx
92   codeParsers.hxx
93   containerParsers.hxx
94   dataParsers.hxx
95   factory.hxx
96   linkParsers.hxx
97   LoadState.hxx
98   loopParsers.hxx
99   nodeParsers.hxx
100   outputParsers.hxx
101   parsers.hxx
102   parserBase.hxx
103   portParsers.hxx
104   presetParsers.hxx
105   ProcCataLoader.hxx
106   procParsers.hxx
107   propertyParsers.hxx
108   rootParser.hxx
109   switchParsers.hxx
110   inlineParsers.hxx
111   componentinstanceParsers.hxx
112   remoteParsers.hxx
113   serverParsers.hxx
114   serviceParsers.hxx
115   typeParsers.hxx
116   xmlParserBase.hxx
117   xmlrpcParsers.hxx
118   sinlineParsers.hxx
119   )
120
121 # --- sources ---
122
123 SET(YACSloader_SOURCES
124   parsers.cxx
125   parserBase.cxx
126   dataParsers.cxx
127   typeParsers.cxx
128   propertyParsers.cxx
129   containerParsers.cxx
130   xmlrpcParsers.cxx
131   rootParser.cxx
132   codeParsers.cxx
133   LoadState.cxx
134   xmlParserBase.cxx
135   ProcCataLoader.cxx
136   componentinstanceParsers.cxx
137   )
138 SET(driver_SOURCES
139   driver.cxx
140   )
141 SET(resume_SOURCES
142   resume.cxx
143   )
144 SET(debugger_SOURCES
145   debugger.cxx
146   )
147
148 # --- rules ---
149
150 ADD_LIBRARY(YACSloader ${YACSloader_SOURCES})
151 TARGET_LINK_LIBRARIES(YACSloader ${YACSloader_LIBRARIES})
152 INSTALL(TARGETS YACSloader EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
153
154 ADD_EXECUTABLE(driver ${driver_SOURCES})
155 TARGET_LINK_LIBRARIES(driver ${_link_LIBRARIES})
156
157 ADD_EXECUTABLE(resume ${resume_SOURCES})
158 TARGET_LINK_LIBRARIES(resume ${_link_LIBRARIES})
159
160 ADD_EXECUTABLE(debugger ${debugger_SOURCES})
161 TARGET_LINK_LIBRARIES(debugger ${_link_LIBRARIES})
162
163 SET_TARGET_PROPERTIES(driver resume debugger PROPERTIES COMPILE_FLAGS ${_exec_DEFINITIONS})
164
165 INSTALL(TARGETS driver resume debugger EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
166
167 INSTALL(FILES ${YACSloader_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
168
169 FILE(GLOB sample_files
170   ${PROJECT_SOURCE_DIR}/src/yacsloader/samples/*.xml 
171   ${PROJECT_SOURCE_DIR}/src/yacsloader/samples/*.pmml
172   ${PROJECT_SOURCE_DIR}/src/yacsloader/samples/*.data)
173 INSTALL(FILES ${sample_files} DESTINATION ${SALOME_YACS_INSTALL_SAMPLES})