From c9d153936ff8e2eeae168e589c76f9a4d5d38a6d Mon Sep 17 00:00:00 2001 From: Axel Naumann Date: Thu, 10 Mar 2022 16:45:27 +0100 Subject: [PATCH] [cmake] Allow python3 to be found; fixes newest / future macOS. And anyway, find_package (PythonInterp) is deprecated since a long time. --- src/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ed39622..8593fa7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ # Auto generate the code for the vector signatures and if needed preload # We need Python for the following. -find_package (PythonInterp REQUIRED) +find_package (Python COMPONENTS Interpreter REQUIRED) # Generate the code for the lib if (PRELOAD) @@ -9,10 +9,10 @@ set (SIGGENOPTS " -p") else() set (SIGGENOPTS " ") endif() -EXEC_PROGRAM ("cd src;${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/signatures_generator.py ${SIGGENOPTS} -o ${CMAKE_SOURCE_DIR}/src;cd -") +EXEC_PROGRAM ("cd src;${Python_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/signatures_generator.py ${SIGGENOPTS} -o ${CMAKE_SOURCE_DIR}/src;cd -") #generare Vc wrapper and config file if(USE_VC) - EXEC_PROGRAM ("cd src;${PYTHON_EXECUTABLE} vc_wrapper_generator.py;cd -") + EXEC_PROGRAM ("cd src;${Python_EXECUTABLE} vc_wrapper_generator.py;cd -") endif(USE_VC) configure_file( ${INC_DIR}/externalLibcfg.h.cmake ${INC_DIR}/externalLibcfg.h)