From bcf259d688f50626417ec085e7cd01eb9d84498b Mon Sep 17 00:00:00 2001 From: Lander Vanroye Date: Fri, 13 Sep 2024 13:51:35 +0200 Subject: [PATCH] fix installation issue fatropy with cmake version < 3.18 (issue #20 ) --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d47f738..3aac940 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -122,7 +122,11 @@ endif() set(WITH_PYTHON OFF CACHE BOOL "Build python bindings (fatropy)") if(WITH_PYTHON) - find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) + if(CMAKE_VERSION VERSION_LESS "3.18") + find_package(Python REQUIRED COMPONENTS Interpreter Development) + else() + find_package(Python REQUIRED COMPONENTS Interpreter Development.Module) + endif() find_package(pybind11 CONFIG) if(NOT pybind11_FOUND) add_subdirectory(external/pybind11)