From: Bernd Waibel Date: Sat, 4 Dec 2021 20:45:49 +0100 Subject: [PATCH] unconditionally search Python interpreter When setting PYOPENVDB_INSTALL_DIRECTORY, CMake would fail with: ``` -- Could NOT find Python (missing: Python_LIBRARIES Development Development.Module Development.Embed) (found version "3.9.9") CMake Error at openvdb/openvdb/python/CMakeLists.txt:65 (message): Could NOT find Python::Module (Required is at least version "2.7") Call Stack (most recent call first): openvdb/openvdb/python/CMakeLists.txt:112 (openvdb_check_python_version) ``` It seems like we always need to search for the interpreter. Bug: https://bugs.gentoo.org/790350 Signed-off-by: Bernd Waibel --- a/openvdb/openvdb/python/CMakeLists.txt +++ b/openvdb/openvdb/python/CMakeLists.txt @@ -73,10 +73,7 @@ endfunction() # target but this was only added in CMake 3.15. See: # https://github.com/AcademySoftwareFoundation/openvdb/issues/886 set(OPENVDB_PYTHON_DEPS) -set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development) -if(NOT DEFINED PYOPENVDB_INSTALL_DIRECTORY) - list(APPEND OPENVDB_PYTHON_REQUIRED_COMPONENTS Interpreter) -endif() +set(OPENVDB_PYTHON_REQUIRED_COMPONENTS Development Interpreter) if(${CMAKE_VERSION} VERSION_LESS 3.14) find_package(Python QUIET COMPONENTS ${OPENVDB_PYTHON_REQUIRED_COMPONENTS}) -- 2.34.1