diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e3e2285e..ed5a17a3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,6 +104,9 @@ find_package(PythonLibs "3.0") set_package_properties(PySide2 PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL) set_package_properties(Shiboken2 PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL) set_package_properties(PythonLibs PROPERTIES DESCRIPTION "Python plugins" TYPE OPTIONAL) +if (PySide2_FOUND AND Shiboken2_FOUND AND PythonLibs_FOUND) + set(ENABLE_PYTHON_PLUGINS TRUE) +endif() # Git revision if (EXISTS "${CMAKE_SOURCE_DIR}/.git") diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 2be439be4..f97bd1ac0 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -19,7 +19,7 @@ if (KF5Wallet_FOUND) add_subdirectory(KWalletPasswords) endif() -if (PySide2_FOUND AND Shiboken2_FOUND AND PythonLibs_FOUND) +if (ENABLE_PYTHON_PLUGINS) add_subdirectory(PyFalkon) endif() diff --git a/src/scripts/CMakeLists.txt b/src/scripts/CMakeLists.txt index d7264839b..c1c16cbff 100644 --- a/src/scripts/CMakeLists.txt +++ b/src/scripts/CMakeLists.txt @@ -1,5 +1,7 @@ function(install_python_script name) - install(DIRECTORY ${name} DESTINATION "${FALKON_INSTALL_PLUGINDIR}/python") + if (ENABLE_PYTHON_PLUGINS) + install(DIRECTORY ${name} DESTINATION "${FALKON_INSTALL_PLUGINDIR}/python") + endif() endfunction() install_python_script(hellopython)