From 50c206e19821cea2919c2592eadf001aa4780f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jani=20V=C3=A4limaa?= <wally@mageia.org> Date: Mon, 26 Dec 2022 06:31:47 +0200 Subject: [PATCH] Fix build with Python >= 3.8 CMake manual says the following: "If component Development is specified, it implies sub-components Development.Module and Development.Embed. Imported Targets: Python::Python Python library for Python embedding. Target defined if component Development.Embed is found." --- openvdb/openvdb/python/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/openvdb/openvdb/python/CMakeLists.txt b/openvdb/openvdb/python/CMakeLists.txt index 82d7c5a..da2180b 100644 --- a/openvdb/openvdb/python/CMakeLists.txt +++ b/openvdb/openvdb/python/CMakeLists.txt @@ -93,9 +93,7 @@ endfunction() # FindPython. set(OPENVDB_PYTHON_DEPS) -# @note explicitly only search for Development.Module from 3.18 as searching -# Development.Embed can cause issues on linux systems where it doesn't exist -set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development.Module) +set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development) if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY) list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter) @@ -108,12 +106,12 @@ endif() # Make sure find_package(Python) is only ever invoked once with all required components find_package(Python COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS}) -openvdb_check_python_version(Python::Module +openvdb_check_python_version(Python::Python "${Python_VERSION}" "${Python_INCLUDE_DIRS}" "${MINIMUM_PYTHON_VERSION}" "${FUTURE_MINIMUM_PYTHON_VERSION}") -list(APPEND OPENVDB_PYTHON_DEPS Python::Module) +list(APPEND OPENVDB_PYTHON_DEPS Python::Python) if(USE_NUMPY) openvdb_check_python_version(Python::NumPy -- 2.39.0