From 5432a0576b7baba454e97bf4632fc5a6136849c9 Mon Sep 17 00:00:00 2001 From: Cam Mannett Date: Tue, 19 Sep 2023 14:12:26 +0100 Subject: [PATCH] Functional tests cannot be built in CMake >= 3.12 In development/CMakeLists.txt:477, the Python interpreter and libs are discovered. It uses the 'old' package discovery mechanism and the new depending on CMake's version. However the old mechanism sets different variables to the new, so the new also sets the old vars for compatibility, however it is missing two variables. The first missing var causes the Python minor version to be hardcoded to zero (renderdoccmd/CMakeLists.txt:9) and the second causes the later conditional (CMakeLists.txt:495) to be malformed. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fb243d2b..94646f228 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -482,6 +482,8 @@ if(ENABLE_QRENDERDOC OR ENABLE_PYRENDERDOC) set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) set(PYTHON_LIBRARY ${Python3_LIBRARIES}) set(PYTHON_INCLUDE_DIR ${Python3_INCLUDE_DIRS}) + set(PythonLibs_FOUND ${Python3_FOUND}) + set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR}) else() find_package(PythonInterp 3 REQUIRED) find_package(PythonLibs 3 REQUIRED)