From 44f6134bafb7d1869a9e1b93117ee157d56ce9b1 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 2 Sep 2016 13:55:15 +0200 Subject: [PATCH] cmake: fail if Python is not found --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 526bec15c0..61c9b47041 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,9 @@ set(PythonInterp_FIND_VERSION 3) set(PythonInterp_FIND_VERSION_COUNT 1) set(PythonInterp_FIND_VERSION_MAJOR 3) include(FindPythonInterp) +if(NOT PYTHON_EXECUTABLE) + message(FATAL_ERROR "Please install Python (version 3 or higher).") +endif() if (APPLE) set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") -- 2.20.1