1 # Copyright (C) 2012-2019 CEA/DEN, EDF R&D, OPEN CASCADE
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 ${SHAPER_INCLUDE_DIRS}
26 ${PYTHON_INCLUDE_DIRS}
27 ${OpenCASCADE_INCLUDE_DIR}
28 ${KERNEL_INCLUDE_DIRS}
29 ${OMNIORB_INCLUDE_DIR}
30 ${CMAKE_CURRENT_SOURCE_DIR}
31 ${PROJECT_SOURCE_DIR}/src/StudyData
34 # additional preprocessor / compiler flags
36 ${OpenCASCADE_DEFINITIONS}
37 ${OMNIORB_DEFINITIONS}
41 # libraries to link to
49 # header files / to be processed by moc
50 SET(SHAPERSTUDY_Swig_HEADERS
56 SET(StudyData_Swig_SOURCES
58 #${SHAPERSTUDY_Swig_HEADERS}
61 # workaround about SWIG_ADD_MODULE bug: remove duplicates in include directories
62 GET_DIRECTORY_PROPERTY(_cmake_include_directories INCLUDE_DIRECTORIES)
63 LIST(REMOVE_DUPLICATES _cmake_include_directories)
64 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_directories}")
67 SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES CPLUSPLUS ON)
68 SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES SWIG_FLAGS "-py3")
69 SET_SOURCE_FILES_PROPERTIES(StudyData_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
73 # scripts / swig wrappings
75 ${CMAKE_CURRENT_BINARY_DIR}/StudyData_Swig.py
79 IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
80 SWIG_ADD_MODULE(StudyData_Swig python ${StudyData_Swig_SOURCES})
82 SWIG_ADD_LIBRARY(StudyData_Swig LANGUAGE python SOURCES ${StudyData_Swig_SOURCES})
86 SWIG_LINK_LIBRARIES(StudyData_Swig ${_link_LIBRARIES})
87 SWIG_CHECK_GENERATION(StudyData_Swig)
89 SET_TARGET_PROPERTIES(_StudyData_Swig PROPERTIES DEBUG_OUTPUT_NAME _StudyData_Swig_d)
92 INSTALL(TARGETS _StudyData_Swig DESTINATION ${SALOME_INSTALL_LIBS})
94 INSTALL(FILES ${StudyData_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
96 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS} EXTRA_DPYS "${SWIG_MODULE_SHAPERSTUDY_Swig_REAL_NAME}")