From 5c082080e19c0be33dc226a00bfc3a119aa7e077 Mon Sep 17 00:00:00 2001
From: Robert K <robertk@posteo.org>
Date: Mon, 30 Mar 2020 14:13:56 +0200
Subject: [PATCH] [feature][DUNE_ENABLE_PYTHONBINDINGS] Added cmake option for
 enabling Python bindings, default is OFF.

---
 CMakeLists.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 712bbc87..bb173369 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,8 +23,12 @@ dune_project()
 add_subdirectory("dune")
 add_subdirectory("doc")
 add_subdirectory("lib")
-add_subdirectory("python")
-dune_python_install_package(PATH python)
+
+# if Python bindings are enabled, include necessary sub directories.
+if( DUNE_ENABLE_PYTHONBINDINGS )
+  add_subdirectory("python")
+  dune_python_install_package(PATH python)
+endif()
 
 # finalize the dune project, e.g. generating config.h etc.
 finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
-- 
GitLab