Python Plugin: Require Python bindings
@@ -3,8 +3,9 @@ include (LibAddBinding)
if (DEPENDENCY_PHASE)
find_package(PythonLibs 3 QUIET)
find_swig()
+ check_binding_included ("swig_python" BINDING_WAS_ADDED SUBDIRECTORY "swig/python" SILENT)
- if (PYTHONLIBS_FOUND AND SWIG_FOUND)
+ if (PYTHONLIBS_FOUND AND SWIG_FOUND AND BINDING_WAS_ADDED)
include (LibAddMacros)
add_custom_command (OUTPUT runtime.h
@@ -16,6 +17,8 @@ if (DEPENDENCY_PHASE)
set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
elseif (NOT PYTHONLIBS_FOUND)
remove_plugin (python "python 3 libs (libpython3-dev) not found")
+ elseif (NOT BINDING_WAS_ADDED)
+ remove_plugin (python "swig_python binding is required")
else ()
remove_plugin (python "swig not found")
endif ()
