# Copyright (C) 2012-2013 EDF # # This file is part of SALOME HYDRO module. # # SALOME HYDRO module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # SALOME HYDRO module is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with SALOME HYDRO module. If not, see . INCLUDE(${SWIG_USE_FILE}) # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_DIRS} ${MASCARET_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} ) # swig flags SET_SOURCE_FILES_PROPERTIES(mascaret_swig.i PROPERTIES CPLUSPLUS ON SWIG_DEFINITIONS "-shadow") # additional preprocessor / compiler flags ADD_DEFINITIONS( ${PYTHON_DEFINITIONS} ) # libraries to link to SET(_link_LIBRARIES ${PYTHON_LIBRARIES} ${MASCARET_LIBRARIES} ) # --- sources --- SET(mascaret_SOURCES Mascaret.cxx ) # --- headers --- SET(mascaret_HEADERS Mascaret.hxx ) # --- scripts --- # scripts / swig wrappings SET(_swig_SCRIPTS ${CMAKE_CURRENT_BINARY_DIR}/mascaret_swig.py ) # --- rules --- SWIG_ADD_MODULE(mascaret_swig python mascaret_swig.i ${mascaret_SOURCES}) SWIG_LINK_LIBRARIES(mascaret_swig "${_link_LIBRARIES}") SET(mypkgpythondir ${SALOME_INSTALL_PYTHON}/salome/hydro/mascaret) INSTALL(TARGETS ${SWIG_MODULE_mascaret_swig_REAL_NAME} DESTINATION ${mypkgpythondir}) SALOME_INSTALL_SCRIPTS("${_swig_SCRIPTS}" ${mypkgpythondir})