MESSAGE(STATUS "")
MESSAGE(STATUS "Setting up python bindings")
+ #
+ # Find Python:
+ #
+ INCLUDE(FindPythonInterp)
+ INCLUDE(FindPythonLibs)
+
+ IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
+ MESSAGE(FATAL_ERROR
+ "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: "
+ "Python bindings require an external boost library, but deal.II was "
+ "configured with bundled boost."
+ )
+ ENDIF()
+
+ #
+ # As of 1.67, boost requires specifying the suffix for the python
+ # component manually.
+ #
+ UNSET(Boost_FOUND)
+ IF(${BOOST_VERSION} VERSION_LESS 1.67)
+ _FIND_PACKAGE(Boost 1.59 COMPONENTS python REQUIRED)
+ ELSE()
+ _FIND_PACKAGE(Boost 1.67 COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
+ ENDIF()
+
+ IF(NOT Boost_FOUND)
+ MESSAGE(FATAL_ERROR
+ "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: "
+ "The external boost library does not provide Boost.Python"
+ )
+ ENDIF()
+
+ #
+ # FIXME: Once finalized, reconsider moving this definitions into
+ # cmake/setup_dealii.cmake
+ #
+ # General information about deal.II:
+ #
+ # PYTHON_BINDINGS_BASE_NAME *)
+ # PYTHON_BINDINGS_DEBUG_NAME *)
+ # PYTHON_BINDINGS_RELEASE_NAME *)
+ #
+ # Information about paths, install locations and names:
+ #
+ # DEAL_II_PYTHON_RELDIR *) **)
+ #
+ # *) Can be overwritten by the command line via -D<...>
+ # **) We do a best effort guess on site-packages location...
+ #
+
+ SET_IF_EMPTY(PYTHON_BINDINGS_BASE_NAME "PyDealII")
+ SET_IF_EMPTY(PYTHON_BINDINGS_DEBUG_NAME "Debug")
+ SET_IF_EMPTY(PYTHON_BINDINGS_RELEASE_NAME "Release")
+
+ SET_IF_EMPTY(DEAL_II_PYTHON_RELDIR
+ "${DEAL_II_LIBRARY_RELDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/${PYTHON_BINDINGS_BASE_NAME}"
+ )
+
ADD_SUBDIRECTORY(source)
MESSAGE(STATUS "Setting up python bindings - Done")
##
## ---------------------------------------------------------------------
-#
-# Find Python:
-#
-
-INCLUDE(FindPythonInterp)
-INCLUDE(FindPythonLibs)
-
-IF(FEATURE_BOOST_BUNDLED_CONFIGURED)
- MESSAGE(FATAL_ERROR
- "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: "
- "Python bindings require an external boost library, but deal.II was "
- "configured with bundled boost."
- )
-ENDIF()
-
-#
-# As of 1.67, boost requires specifying the suffix for the python
-# component manually.
-#
-UNSET(Boost_FOUND)
-IF(${BOOST_VERSION} VERSION_LESS 1.67)
- _FIND_PACKAGE(Boost 1.59 COMPONENTS python REQUIRED)
-ELSE()
- _FIND_PACKAGE(Boost 1.67 COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED)
-ENDIF()
-
-IF(NOT Boost_FOUND)
- MESSAGE(FATAL_ERROR
- "DEAL_II_COMPONENT_PYTHON_BINDINGS has unmet configuration requirements: "
- "The external boost library does not provide Boost.Python"
- )
-ENDIF()
-
-#
-# FIXME: Once finalized, reconsider moving this definitions into
-# cmake/setup_dealii.cmake
-#
-# General information about deal.II:
-#
-# PYTHON_BINDINGS_BASE_NAME *)
-# PYTHON_BINDINGS_DEBUG_NAME *)
-# PYTHON_BINDINGS_RELEASE_NAME *)
-#
-# Information about paths, install locations and names:
-#
-# DEAL_II_PYTHON_RELDIR *) **)
-#
-# *) Can be overwritten by the command line via -D<...>
-# **) We do a best effort guess on site-packages location...
-#
-
-SET_IF_EMPTY(PYTHON_BINDINGS_BASE_NAME "PyDealII")
-SET_IF_EMPTY(PYTHON_BINDINGS_DEBUG_NAME "Debug")
-SET_IF_EMPTY(PYTHON_BINDINGS_RELEASE_NAME "Release")
-
-SET_IF_EMPTY(DEAL_II_PYTHON_RELDIR
- "${DEAL_II_LIBRARY_RELDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/${PYTHON_BINDINGS_BASE_NAME}"
- )
-
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}/include/
${CMAKE_SOURCE_DIR}/include/