python/CMakeLists.txt: rework Python development files detection master
authorYegor Yefremov <yegorslists@googlemail.com>
Mon, 23 Jun 2025 12:44:13 +0000 (14:44 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 30 Jun 2025 11:28:35 +0000 (13:28 +0200)
commitf7ed9dd371f9387ed5b715a4f316eea9f85de48d
treeabffb66d002f2f21da0c24fca648f90ea7dde0bd
parenteaf42c00bfab5d6bbd8106b11a697ff4f2d7659f
python/CMakeLists.txt: rework Python development files detection

Both the FindPythonInterp and FindPythonLibs modules were removed. Use
find_package(Python3 COMPONENTS Interpreter Development) to find both
the interpreter and the library.

The old modules have been deprecated since CMake 3.12.

Resolves the following warning:

CMake Warning (dev) at python/CMakeLists.txt:11 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.
python/CMakeLists.txt