Salome HOME
Revert "Synchronize adm files"
[modules/hexablock.git] / src / HEXABLOCK_SWIG / CMakeLists.txt
1 # Copyright (C) 2012-2014  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 INCLUDE(${SWIG_USE_FILE})
21
22 # --- options ---
23 # additional include directories
24 INCLUDE_DIRECTORIES(
25   ${KERNEL_INCLUDE_DIRS}
26   ${PYTHON_INCLUDE_DIRS}
27   ${CAS_INCLUDE_DIRS}
28   ${VTK_INCLUDE_DIRS}
29   ${GEOM_INCLUDE_DIRS}
30   ${Boost_INCLUDE_DIRS}
31   ${OMNIORB_INCLUDE_DIR}
32   ${PROJECT_SOURCE_DIR}/src/HEXABLOCK
33 )
34
35 # additional preprocessor / compiler flags
36 ADD_DEFINITIONS(
37   ${KERNEL_DEFINITIONS}
38   ${CAS_DEFINITIONS}
39   ${BOOST_DEFINITIONS}
40 )
41
42 # libraries to link to
43 SET(_link_LIBRARIES
44   ${PYTHON_LIBRARIES}
45   ${GEOM_GEOMBase}
46   ${CAS_TKBRep}
47   ${CAS_TKPrim}
48   ${CAS_TKG3d}
49   ${CAS_TKG2d}
50   ${CAS_TKTopAlgo}
51   ${CAS_TKGeomBase}
52   ${CAS_TKGeomAlgo}
53   ${CAS_TKBool}
54   ${CAS_TKBO}
55   ${KERNEL_SALOMELocalTrace}
56   ${KERNEL_SALOMEBasics}
57   HEXABLOCKEngine
58 )
59
60 # swig flags
61 SET_SOURCE_FILES_PROPERTIES(hexablock_swig.i PROPERTIES CPLUSPLUS ON)
62 SET_SOURCE_FILES_PROPERTIES(hexablock_swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
63
64 # --- sources ---
65
66 # sources / static
67 SET(_hexablock_swig_SOURCES
68   hexablock_swig_wrap.cc 
69 )
70
71 # --- scripts ---
72
73 # scripts / static
74 SET(_bin_SCRIPTS
75   hexablock_swig.py 
76   hexablock.py
77 )
78
79 # --- rules ---
80
81 ADD_LIBRARY(hexablock_swig_lib ${_hexablock_swig_SOURCES})
82 TARGET_LINK_LIBRARIES(hexablock_swig_lib ${_link_LIBRARIES} )
83
84 SWIG_ADD_MODULE(hexablock_swig python ${_hexablock_swig_SOURCES})
85 SWIG_LINK_LIBRARIES(hexablock_swig ${_link_LIBRARIES} ${hexablock_swig_lib})
86 INSTALL(TARGETS _hexablock_swig DESTINATION ${SALOME_INSTALL_LIBS})
87
88 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})