diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d3bdec59a9c2071de46f98a7258bf31592a1ff4..aa07a113b2a789cbdfd6a70e6d3bae0ce1ded2b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,8 +35,10 @@ add_subdirectory(examples EXCLUDE_FROM_ALL) # if Python bindings are enabled, include necessary sub directories. if(DUNE_ENABLE_PYTHONBINDINGS) - add_subdirectory(python) - dune_python_install_package(PATH "python") + if(${dune-common_VERSION} VERSION_GREATER_EQUAL 2.8) + add_subdirectory(python) + dune_python_install_package(PATH "python") + endif() endif() # finalize the dune project, e.g. generating config.h etc. diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 10f2e116f95d19981893b05b99ce3d314457aaac..091a9b50896ffd2a1544f97af0e276c857600245 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -15,5 +15,7 @@ add_subdirectory(timestepping) # if Python bindings are enabled, include Python binding tests if(DUNE_ENABLE_PYTHONBINDINGS) - add_subdirectory(python) + if(${dune-common_VERSION} VERSION_GREATER_EQUAL 2.8) + add_subdirectory(python) + endif() endif()