1 # Copyright (C) 2017-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 ${PTHREAD_INCLUDE_DIR} # pthread dependancy due to python2.7 library
27 ${CMAKE_CURRENT_SOURCE_DIR}
28 ${PROJECT_SOURCE_DIR}/src/ADAPTFrontTrack
31 # additional preprocessor / compiler flags
36 # libraries to link to
45 # header files / to be processed by moc
46 SET(ADAPTFrontTrack_Swig_HEADERS
53 SET(ADAPTFrontTrack_Swig_SOURCES
54 ${ADAPTFrontTrack_Swig_HEADERS}
58 SET_SOURCE_FILES_PROPERTIES(FrontTrack_Swig.i PROPERTIES CPLUSPLUS ON)
59 SET_SOURCE_FILES_PROPERTIES(FrontTrack_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
63 # scripts / swig wrappings
65 ${CMAKE_CURRENT_BINARY_DIR}/FrontTrack.py
69 IF(${CMAKE_VERSION} VERSION_LESS "3.8.0")
70 SWIG_ADD_MODULE(FrontTrack_Swig python ${ADAPTFrontTrack_Swig_SOURCES})
72 SWIG_ADD_LIBRARY(FrontTrack_Swig LANGUAGE python SOURCES ${ADAPTFrontTrack_Swig_SOURCES})
75 SWIG_LINK_LIBRARIES(FrontTrack_Swig ${_link_LIBRARIES})
76 SWIG_CHECK_GENERATION(FrontTrack_Swig)
78 SET_TARGET_PROPERTIES(_FrontTrack_Swig PROPERTIES DEBUG_OUTPUT_NAME _FrontTrack_Swig_d)
81 INSTALL(TARGETS ${SWIG_MODULE_FrontTrack_Swig_REAL_NAME} DESTINATION ${SALOME_INSTALL_PYTHON})
83 SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${SALOME_INSTALL_PYTHON} EXTRA_DPYS "${SWIG_MODULE_FrontTrack_Swig_REAL_NAME}")