Salome HOME
ded39676ff1220846df3510f353f0521f0ce32a8
[modules/smesh.git] / src / SMESH_SWIG_WITHIHM / 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 INCLUDE(${SWIG_USE_FILE})
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${QT_INCLUDES}
26   ${PYTHON_INCLUDE_DIRS}
27   ${CAS_INCLUDE_DIRS}
28   ${VTK_INCLUDE_DIRS}
29   ${OGL_INCLUDE_DIRS}
30   ${KERNEL_INCLUDE_DIRS}
31   ${GUI_INCLUDE_DIRS}
32   ${MEDFILE_INCLUDE_DIRS}
33   ${GEOM_INCLUDE_DIRS}
34   ${OMNIORB_INCLUDE_DIR}
35   ${Boost_INCLUDE_DIRS}
36   ${CMAKE_CURRENT_SOURCE_DIR}
37   ${PROJECT_SOURCE_DIR}/src/SMESHGUI
38   ${PROJECT_BINARY_DIR}/idl
39 )
40
41 # additional preprocessor / compiler flags
42 ADD_DEFINITIONS(
43   ${CAS_DEFINITIONS}
44   ${OMNIORB_DEFINITIONS}
45   ${PYTHON_DEFINITIONS}
46 )
47
48 # libraries to link to
49 SET(_link_LIBRARIES
50   ${KERNEL_SalomeGenericObj}
51   ${KERNEL_SALOMELocalTrace}
52   ${GUI_CAM}
53   ${GUI_suit}
54   ${GUI_qtx}
55   ${GUI_SalomeApp}
56   ${GUI_std}
57   ${GUI_Event}
58   SMESH
59 )
60
61 # --- headers ---
62
63 # header files / to be processed by moc
64 SET(SMESH_Swig_HEADERS
65   libSMESH_Swig.h
66   libSMESH_Swig.i
67 )
68
69 # --- sources ---
70
71 # sources / static
72 SET(SMESH_Swig_SOURCES
73   libSMESH_Swig.cxx
74   ${SMESH_Swig_HEADERS}
75 )
76
77 # swig flags
78 SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES CPLUSPLUS ON)
79 SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
80 SET_SOURCE_FILES_PROPERTIES(libSMESH_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
81
82 # --- scripts ---
83
84 # scripts / swig wrappings
85 SET(_swig_SCRIPTS
86   ${CMAKE_CURRENT_BINARY_DIR}/libSMESH_Swig.py 
87 )
88
89 # --- rules ---
90
91 SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES})
92 SWIG_LINK_LIBRARIES(libSMESH_Swig ${_link_LIBRARIES})
93 INSTALL(TARGETS _libSMESH_Swig DESTINATION ${SALOME_INSTALL_LIBS})
94
95 INSTALL(FILES ${SMESH_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
96
97 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}"  ${SALOME_INSTALL_BINS})