From 5a9f010b1f95f842f439de74a88e312ffbbb88c2 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 2 May 2023 09:18:57 +0200 Subject: [PATCH] fixed: conditionally use Development.XXX in python find module the split into Development.Module and Development.Embed was is introduced in cmake 3.18 --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b6923450..09e1e307d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,11 @@ if (OPM_ENABLE_PYTHON) if(PYTHON_EXECUTABLE AND NOT Python3_EXECUTABLE) set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) endif() - find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) + if(${CMAKE_VERSION} VERSION_LESS "3.18.0") + find_package(Python3 REQUIRED COMPONENTS Interpreter Development) + else() + find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module) + endif() endif() if(Python3_VERSION_MINOR LESS 3) # Python native namespace packages requires python >= 3.3