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.
This commit is contained in:
Cam Mannett
2023-09-19 14:12:26 +01:00
committed by Baldur Karlsson
parent d911ec8e3d
commit 5432a0576b
+2
View File
@@ -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)