cmake: fix Python requirement

Perl is no longer needed.

Python must be version 3. Version 2 is not suitable.

The variable is PYTHONINTERP_FOUND, not PYTHON_FOUND.
This commit is contained in:
Gilles Peskine 2019-09-04 22:10:34 +02:00 committed by Darryl Green
parent aebf0027c0
commit 9740929371

View File

@ -46,9 +46,9 @@ set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}"
"${CTR_DRBG_128_BIT_KEY_WARN_L3}" "${CTR_DRBG_128_BIT_KEY_WARN_L3}"
"${WARNING_BORDER}") "${WARNING_BORDER}")
find_package(PythonInterp) # Python 3 is only needed here to check for configuration warnings.
find_package(Perl) find_package(PythonInterp 3)
if(PYTHON_FOUND) if(PYTHONINTERP_FOUND)
# If 128-bit keys are configured for CTR_DRBG, display an appropriate warning # If 128-bit keys are configured for CTR_DRBG, display an appropriate warning
execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/config.py -f ${CMAKE_CURRENT_SOURCE_DIR}/include/mbedtls/config.h get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY