]> SALOME platform Git repositories - modules/kernel.git/blob - src/Launcher/CMakeLists.txt
Salome HOME
Reduced dependencies on Launcher part. Removed SALOME_LAUNCHER_ONLY mode.
[modules/kernel.git] / src / Launcher / CMakeLists.txt
1 # Copyright (C) 2012-2015  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, 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 ENDIF(SALOME_BUILD_TESTS)
23
24 INCLUDE_DIRECTORIES(
25   ${LIBXML2_INCLUDE_DIR}
26   ${OMNIORB_INCLUDE_DIR}
27   ${PYTHON_INCLUDE_DIRS}
28   ${PTHREAD_INCLUDE_DIR}
29   ${LIBBATCH_INCLUDE_DIRS}
30   ${PROJECT_BINARY_DIR}/salome_adm
31   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
32   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
33   ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
34   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
35   ${CMAKE_CURRENT_SOURCE_DIR}/../Registry
36   ${CMAKE_CURRENT_SOURCE_DIR}/../Notification
37   ${CMAKE_CURRENT_SOURCE_DIR}/../Container
38   ${CMAKE_CURRENT_SOURCE_DIR}/../ResourcesManager
39   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMESDS
40   ${PROJECT_BINARY_DIR}/idl
41 )
42
43 ADD_DEFINITIONS(${LIBXML2_DEFINITIONS} ${OMNIORB_DEFINITIONS})
44 IF(SALOME_USE_LIBBATCH)
45   ADD_DEFINITIONS(-DWITH_LIBBATCH)
46 ENDIF(SALOME_USE_LIBBATCH)
47
48 # This local variable defines the list of dependant libraries common to all target in this package.
49 SET(COMMON_LIBS
50   Registry
51   SalomeNotification
52   SalomeContainer
53   SalomeResourcesManager
54   SalomeNS
55   OpUtil
56   SALOMELocalTrace
57   SALOMEBasics
58   SalomeIDLKernel
59   ${LIBBATCH_LIBRARIES}
60   ${OMNIORB_LIBRARIES}
61   ${LIBXML2_LIBRARIES}
62   ${PYTHON_LIBRARIES}
63 )
64
65 SET(Launcher_SOURCES
66   SALOME_Launcher_Parser.cxx
67   SALOME_Launcher_Handler.cxx
68   Launcher_Job.cxx
69   Launcher_Job_Command.cxx
70   Launcher_Job_SALOME.cxx
71   Launcher_Job_PythonSALOME.cxx
72   Launcher_Job_YACSFile.cxx
73   Launcher.cxx
74   Launcher_XML_Persistence.cxx
75 )
76
77 ADD_LIBRARY(Launcher ${Launcher_SOURCES})
78 TARGET_LINK_LIBRARIES(Launcher ResourcesManager ${LIBBATCH_LIBRARIES} ${LIBXML2_LIBS})
79 INSTALL(TARGETS Launcher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
80
81 SET(TestLauncher_LIBS
82   ${LIBXML2_LIBRARIES}
83   ResourcesManager
84   Launcher
85   ${LIBBATCH_LIBRARIES}
86 )
87
88 # TestLauncher needs only (and must need only) libxml, libbatch, ResourceManager and Launcher libraries!
89 ADD_EXECUTABLE(TestLauncher TestLauncher.cxx)
90 TARGET_LINK_LIBRARIES(TestLauncher ${TestLauncher_LIBS})
91 INSTALL(TARGETS TestLauncher DESTINATION ${SALOME_INSTALL_BINS})
92
93 ADD_LIBRARY(SalomeLauncher BatchTest.cxx SALOME_Launcher.cxx)
94 TARGET_LINK_LIBRARIES(SalomeLauncher Launcher ${COMMON_LIBS})
95 INSTALL(TARGETS SalomeLauncher EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
96   
97 SET(SALOME_LauncherServer_LIBS
98   Launcher
99   SalomeLauncher
100   SalomeSDS
101   SALOMEBasics
102   SALOMELocalTrace
103   ${LIBBATCH_LIBRARIES}
104   ${OMNIORB_LIBRARIES}
105   ${LIBXML2_LIBRARIES}
106   ${PYTHON_LIBRARIES}
107 )
108
109 ADD_EXECUTABLE(SALOME_LauncherServer SALOME_LauncherServer.cxx)
110 TARGET_LINK_LIBRARIES(SALOME_LauncherServer ${SALOME_LauncherServer_LIBS})
111 INSTALL(TARGETS SALOME_LauncherServer EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
112
113 SET(COMMON_HEADERS_HXX
114   BatchTest.hxx
115   Launcher.hxx
116   Launcher_Job.hxx
117   Launcher_Job_Command.hxx
118   Launcher_Job_PythonSALOME.hxx
119   Launcher_Job_SALOME.hxx
120   Launcher_Job_YACSFile.hxx
121   Launcher_Utils.hxx
122   SALOME_Launcher.hxx
123   SALOME_Launcher_Parser.hxx
124   SALOME_Launcher_defs.hxx
125 )
126 INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${SALOME_INSTALL_HEADERS})
127 INSTALL(FILES testLauncher.xml DESTINATION ${SALOME_KERNEL_INSTALL_RES_DATA})