Salome HOME
Fix pb with persistence of "light" modules: SaveAs operation leads to loss of non...
[modules/gui.git] / src / Session / CMakeLists.txt
1 # Copyright (C) 2012-2014  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 # --- options ---
21
22 # additional include directories
23 INCLUDE_DIRECTORIES(
24   ${QT_INCLUDES}
25   ${Boost_INCLUDE_DIRS}
26   ${PYTHON_INCLUDE_DIRS}
27   ${CAS_INCLUDE_DIRS}
28   ${OMNIORB_INCLUDE_DIR}
29   ${PTHREAD_INCLUDE_DIR}
30   ${PROJECT_BINARY_DIR}
31   ${PROJECT_BINARY_DIR}/idl
32   ${PROJECT_SOURCE_DIR}/src/Qtx
33   ${PROJECT_SOURCE_DIR}/src/SUIT
34   ${PROJECT_SOURCE_DIR}/src/Event
35   ${PROJECT_SOURCE_DIR}/src/Style
36   ${PROJECT_SOURCE_DIR}/src/SalomeApp
37 )
38
39 # additional preprocessor / compiler flags
40 ADD_DEFINITIONS(
41   ${QT_DEFINITIONS}
42   ${BOOST_DEFINITIONS}
43   ${PYTHON_DEFINITIONS}
44   ${CAS_DEFINITIONS}
45   ${OMNIORB_DEFINITIONS}
46 )
47 IF(ENABLE_TESTRECORDER)
48   ADD_DEFINITIONS("-DENABLE_TESTRECORDER ${TESTRECORDER_DEFINITIONS}")
49 ENDIF()
50
51 # libraries to link to
52 SET(_link_LIBRARIES
53   ${QT_LIBRARIES}
54   ${CAS_KERNEL}
55   ${OMNIORB_LIBRARIES}
56   ${KERNEL_SalomeNS}
57   ${KERNEL_SalomeLifeCycleCORBA}
58   ${KERNEL_OpUtil}
59   ${KERNEL_SALOMELocalTrace}
60   ${KERNEL_SalomeCatalog}
61   ${KERNEL_SalomeDSClient}
62   ${KERNEL_with_loggerTraceCollector}
63   ${KERNEL_SalomeIDLKernel}
64   ${KERNEL_SalomeContainer}
65   ${KERNEL_SalomeLauncher}
66   ${KERNEL_Registry}
67   ${KERNEL_SALOMEBasics}
68   qtx suit Event SalomeStyle SalomeApp SalomeIDLGUI
69 )
70 IF(ENABLE_TESTRECORDER)
71   LIST(APPEND _link_LIBRARIES ${TESTRECORDER_LIBS})
72 ENDIF()
73
74 # --- headers ---
75
76 # header files / to install
77 SET(SalomeSession_HEADERS
78   SALOME_Session.hxx
79   Session_ServerCheck.hxx
80   Session_ServerLauncher.hxx
81   Session_ServerThread.hxx
82   Session_Session_i.hxx
83 )
84
85 # --- sources ---
86
87 # sources / to compile
88 SET(SalomeSession_SOURCES
89   Session_ServerCheck.cxx
90   Session_ServerLauncher.cxx
91   Session_ServerThread.cxx
92   Session_Session_i.cxx
93 )
94
95 # --- rules ---
96
97 ADD_LIBRARY(SalomeSession ${SalomeSession_SOURCES})
98 TARGET_LINK_LIBRARIES(SalomeSession ${_link_LIBRARIES})
99 INSTALL(TARGETS SalomeSession EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) 
100
101 ADD_EXECUTABLE(SALOME_Session_Server SALOME_Session_Server.cxx)
102 TARGET_LINK_LIBRARIES(SALOME_Session_Server ${_link_LIBRARIES} SalomeSession)
103 INSTALL(TARGETS SALOME_Session_Server EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
104
105 INSTALL(FILES ${SalomeSession_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})