From d03ed2dd4c3874de1ef8feb93233f947071f4d73 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Mon, 15 Apr 2024 19:16:47 +0200 Subject: [PATCH] fix: also check for presence of Python header with meson Checking for the presence of a Python installation alone is not sufficient and building will fail with compiler errors on systems, which have Python installed but not the matching headers Signed-off-by: Christopher Arndt --- meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meson.build b/meson.build index 39efc4f..d748e2f 100644 --- a/meson.build +++ b/meson.build @@ -77,6 +77,9 @@ have_semaphore = cpp.has_header('semaphore.h') pymod = import('python') python = pymod.find_installation(get_option('python'), required: true, pure: false) +have_python_header = cpp.has_header('Python.h', + include_directories: include_directories(python.get_path('include')), required: true) + # Generate _rtmidi extension source subdir('src')