Salome HOME
Copyright update: 2016
[modules/gui.git] / src / PVServerService / ServiceLoader / CMakeLists.txt
1 # Copyright (C) 2010-2016  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 INCLUDE(${SWIG_USE_FILE})
21
22 INCLUDE_DIRECTORIES(
23   ${CMAKE_CURRENT_SOURCE_DIR}
24   ${CMAKE_CURRENT_SOURCE_DIR}/..
25   ${OMNIORB_INCLUDE_DIR}
26   ${KERNEL_INCLUDE_DIRS}
27   )
28
29 ADD_DEFINITIONS(
30   ${OMNIORB_DEFINITIONS}
31   ${KERNEL_DEFINITIONS}
32   )
33
34 SET(_link_LIBRARIES 
35   ${KERNEL_OpUtil}        # class SALOME_Exception
36   ${KERNEL_SalomeContainer} 
37   ${KERNEL_SalomeNS}
38   ${KERNEL_SalomeLifeCycleCORBA}
39   )
40
41 # --- headers ---
42 SET(_HEADERS
43   PVServer_ServiceLoader.h
44 )
45
46 # --- sources ---
47 SET(_SOURCES
48     PVServer_ServiceLoader.cxx
49   )
50   
51 SET(_SWIG
52     PVServer_ServiceLoader.i
53    )
54   
55 # --- rules ---
56 ADD_LIBRARY(PVServerServiceLoader ${_SOURCES})
57 TARGET_LINK_LIBRARIES(PVServerServiceLoader ${_link_LIBRARIES})
58 INSTALL(TARGETS PVServerServiceLoader EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
59
60 # --- SWIG part ---
61 SET_SOURCE_FILES_PROPERTIES(${_SWIG} PROPERTIES CPLUSPLUS ON)
62 SET_SOURCE_FILES_PROPERTIES(${_SWIG} PROPERTIES SWIG_DEFINITIONS "-shadow")
63 SWIG_ADD_MODULE(PVServer_ServiceLoader python ${_SWIG})
64 IF(WIN32)
65   SET_TARGET_PROPERTIES(_PVServer_ServiceLoader PROPERTIES DEBUG_OUTPUT_NAME _PVServer_ServiceLoader_d)
66 ENDIF(WIN32)
67 SWIG_LINK_LIBRARIES(PVServer_ServiceLoader ${PYTHON_LIBRARIES} PVServerServiceLoader)
68
69 INSTALL(TARGETS ${SWIG_MODULE_PVServer_ServiceLoader_REAL_NAME} EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_PYTHON})
70 SALOME_INSTALL_SCRIPTS(${CMAKE_CURRENT_BINARY_DIR}/PVServer_ServiceLoader.py ${SALOME_INSTALL_PYTHON})
71   
72 # --- header installation ---
73 INSTALL(FILES ${_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})