1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01:00

Don't install Python extensions when Python support is disabled

This commit is contained in:
David Rosca 2018-02-26 18:28:58 +01:00
parent 43e886a1b0
commit 791c9f6b1d
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
3 changed files with 7 additions and 2 deletions

View File

@ -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")

View File

@ -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()

View File

@ -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)