INCLUDE(${SWIG_USE_FILE}) SET_SOURCE_FILES_PROPERTIES(CoreFlows.i PROPERTIES CPLUSPLUS ON) SET_SOURCE_FILES_PROPERTIES(CoreFlows.i PROPERTIES C OFF) SET_SOURCE_FILES_PROPERTIES(CoreFlows.i PROPERTIES SWIG_DEFINITIONS "-shadow") INCLUDE_DIRECTORIES( ${Python_INCLUDE_DIRS} ${CoreFlows_INCLUDES} # ${PETSC_INCLUDES} ${SLEPC_INCLUDES} ) SET(_extra_lib_SWIG ${CDMATH_LIBRARIES} ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES}) IF (${CMAKE_VERSION} VERSION_LESS "3.8.0") SWIG_ADD_MODULE(CoreFlows python CoreFlows.i) ELSE (${CMAKE_VERSION} VERSION_LESS "3.8.0") SWIG_ADD_LIBRARY(CoreFlows TYPE SHARED LANGUAGE python SOURCES CoreFlows.i) ENDIF(${CMAKE_VERSION} VERSION_LESS "3.8.0") SWIG_LINK_LIBRARIES(CoreFlows ${Python_LIBRARIES} ${_extra_lib_SWIG} CoreFlowsLibs ${PETSC_LIBRARIES} ${SLEPC_LIBRARIES}) INSTALL(TARGETS _CoreFlows DESTINATION lib/coreflows) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/CoreFlows.py DESTINATION bin/coreflows) INSTALL(FILES ${CoreFlows_SOURCE_DIR}/mainCoreFlows.py DESTINATION bin/)