From c181309163e14f0c91616f3597806079f70f4022 Mon Sep 17 00:00:00 2001
From: Frederik Hennig <frederik.hennig@fau.de>
Date: Tue, 28 Nov 2023 09:59:52 +0100
Subject: [PATCH] fixed find module

---
 src/pystencilssfg/cmake/FindPystencilsSfg.cmake | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/pystencilssfg/cmake/FindPystencilsSfg.cmake b/src/pystencilssfg/cmake/FindPystencilsSfg.cmake
index c1affee..a5e7b11 100644
--- a/src/pystencilssfg/cmake/FindPystencilsSfg.cmake
+++ b/src/pystencilssfg/cmake/FindPystencilsSfg.cmake
@@ -13,8 +13,10 @@ if(${_PystencilsSfgFindResult} EQUAL 0)
     set( PystencilsSfg_FOUND ON )
 endif()
 
-if(${PystencilsSfg_FIND_REQUIRED} AND (NOT ${PystencilsSfg_FOUND}))
-    message( FATAL_ERROR "Could not find pystencils-sfg in current Python environment." )
+if(DEFINED PystencilsSfg_FIND_REQUIRED)
+    if(NOT ${PystencilsSfg_FOUND})
+        message( FATAL_ERROR "Could not find pystencils-sfg in current Python environment." )
+    endif()
 endif()
 
 if(${PystencilsSfg_FOUND})
-- 
GitLab