1 # Copyright (C) 2012-2023 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 INCLUDE(${SWIG_USE_FILE})
23 # additional include directories
25 ${KERNEL_INCLUDE_DIRS}
26 ${PYTHON_INCLUDE_DIRS}
27 ${OpenCASCADE_INCLUDE_DIR}
30 ${OMNIORB_INCLUDE_DIR}
31 ${PROJECT_SOURCE_DIR}/src/HEXABLOCK
34 # additional preprocessor / compiler flags
37 ${OpenCASCADE_DEFINITIONS}
41 # libraries to link to
44 ${OpenCASCADE_ModelingData_LIBRARIES}
45 ${OpenCASCADE_ModelingAlgorithms_LIBRARIES}
46 ${KERNEL_SALOMELocalTrace}
47 ${KERNEL_SALOMEBasics}
52 SET_SOURCE_FILES_PROPERTIES(hexablock_swig.i PROPERTIES CPLUSPLUS ON)
53 SET_SOURCE_FILES_PROPERTIES(hexablock_swig.i PROPERTIES SWIG_FLAGS "-py3")
58 SET(_hexablock_swig_SOURCES
59 hexablock_swig_wrap.cc
72 ADD_LIBRARY(hexablock_swig_lib ${_hexablock_swig_SOURCES})
73 TARGET_LINK_LIBRARIES(hexablock_swig_lib ${_link_LIBRARIES} )
75 IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
76 SWIG_ADD_MODULE(hexablock_swig python hexablock_swig.i)
78 SWIG_ADD_LIBRARY(hexablock_swig LANGUAGE python SOURCES hexablock_swig.i)
82 SWIG_LINK_LIBRARIES(hexablock_swig ${_link_LIBRARIES} ${hexablock_swig_lib})
83 INSTALL(TARGETS _hexablock_swig DESTINATION ${SALOME_INSTALL_LIBS})
85 SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_SCRIPT_PYTHON})