From d031c3d854ebcc47cc97b21fb2c6a5e332028909 Mon Sep 17 00:00:00 2001
From: Patrick Jaap <patrick.jaap@tu-dresden.de>
Date: Thu, 15 Apr 2021 17:36:08 +0200
Subject: [PATCH] Cmake: Look for PYTHONLIBS and for Python3

This basically reverts f10d311dd1d6f5e36d0c2cfdf6440af75c9ae8ad
---
 src/CMakeLists.txt | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ecb911f..f444351 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,12 +1,8 @@
-if(ADOLC_FOUND AND IPOPT_FOUND AND Python3_FOUND AND dune-uggrid_FOUND)
-  set(programs linear-elasticity)
-
-  # When combining dune-common 2.7 and dune-fufem 2.8, no cmake test for the
-  # Python bindings is ever called (that's not a bug).  In that case
-  # we simply skip building the one executable that needs Python.
-  if(NOT (${dune-common_VERSION} VERSION_LESS_EQUAL "2.7.9" AND ${dune-fufem_VERSION} VERSION_GREATER_EQUAL "2.8.0"))
-    set(programs ${programs} finite-strain-elasticity)
-  endif()
+# Note: PYTHONLIBS_FOUND is only for backwards compatibility with dune-fufem 2.7 and can be removed
+#       in the next release
+if(ADOLC_FOUND AND IPOPT_FOUND AND ( Python3_FOUND OR PYTHONLIBS_FOUND )  AND dune-uggrid_FOUND)
+  set(programs linear-elasticity
+               finite-strain-elasticity)
 
   foreach(_program ${programs})
     add_executable(${_program} ${_program}.cc)
-- 
GitLab