1 # Copyright (C) 2019-2020 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 ${PYTHON_INCLUDE_DIRS}
26 ${OpenCASCADE_INCLUDE_DIR}
27 ${OMNIORB_INCLUDE_DIR}
28 ${PROJECT_SOURCE_DIR}/src/StudyData
31 # additional preprocessor / compiler flags
33 ${OpenCASCADE_DEFINITIONS}
34 ${OMNIORB_DEFINITIONS}
38 # libraries to link to
46 # header files / to be processed by moc
47 SET(SHAPERSTUDY_Swig_HEADERS
53 SET(StudyData_Swig_SOURCES
55 #${SHAPERSTUDY_Swig_HEADERS}
58 # workaround about SWIG_ADD_MODULE bug: remove duplicates in include directories
59 GET_DIRECTORY_PROPERTY(_cmake_include_directories INCLUDE_DIRECTORIES)
60 LIST(REMOVE_DUPLICATES _cmake_include_directories)
61 SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_directories}")
64 SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES CPLUSPLUS ON)
65 SET_SOURCE_FILES_PROPERTIES(StudyData_Swig.i PROPERTIES SWIG_FLAGS "-py3")
66 SET_SOURCE_FILES_PROPERTIES(StudyData_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H")
70 # scripts / swig wrappings
72 ${CMAKE_CURRENT_BINARY_DIR}/StudyData_Swig.py
76 IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
77 SWIG_ADD_MODULE(StudyData_Swig python ${StudyData_Swig_SOURCES})
79 SWIG_ADD_LIBRARY(StudyData_Swig LANGUAGE python SOURCES ${StudyData_Swig_SOURCES})
83 SWIG_LINK_LIBRARIES(StudyData_Swig ${_link_LIBRARIES})
84 SWIG_CHECK_GENERATION(StudyData_Swig)
86 SET_TARGET_PROPERTIES(_StudyData_Swig PROPERTIES DEBUG_OUTPUT_NAME _StudyData_Swig_d)
89 INSTALL(TARGETS _StudyData_Swig DESTINATION ${SALOME_INSTALL_LIBS})
91 INSTALL(FILES ${StudyData_Swig_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
93 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_BINS} EXTRA_DPYS "${SWIG_MODULE_StudyData_Swig_REAL_NAME}")