aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2017-01-15 11:36:08 +0000
committerStephen Kelly <steveire@gmail.com>2017-01-15 11:48:23 +0000
commit51410384458b941291f71400d49c3f6d6efbef49 (patch)
tree8a5512364a2ac7c730e8d00714200221a97bdf7f /src
parenteab822e206207c51d47f0f0da109caacfbee4e2f (diff)
downloadkconfig-51410384458b941291f71400d49c3f6d6efbef49.tar.gz
kconfig-51410384458b941291f71400d49c3f6d6efbef49.tar.bz2
Add python bindings
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt26
-rw-r--r--src/gui/CMakeLists.txt23
2 files changed, 49 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 0ad24b94..83e4f76e 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -52,6 +52,32 @@ ecm_generate_headers(KConfigCore_HEADERS
REQUIRED_HEADERS KConfigCore_HEADERS
)
+find_package(PythonModuleGeneration)
+
+if (PythonModuleGeneration_FOUND)
+ ecm_generate_python_binding(
+ TARGET KF5::ConfigCore
+ PYTHONNAMESPACE PyKF5
+ MODULENAME KConfigCore
+ RULES_FILE "${CMAKE_SOURCE_DIR}/cmake/rules_PyKF5.py"
+ INSTALL_DIR_SUFFIX ${KDE_INSTALL_PYTHONBINDINGSDIR}
+ SIP_DEPENDS
+ QtCore/QtCoremod.sip
+ HEADERS
+ kauthorized.h
+ kconfig.h
+ kconfigbackend.h
+ kconfigbase.h
+ kconfigdata.h
+ kconfiggroup.h
+ kdesktopfile.h
+ ksharedconfig.h
+ kcoreconfigskeleton.h
+ kemailsettings.h
+ conversioncheck.h
+ )
+endif()
+
install(TARGETS KF5ConfigCore EXPORT KF5ConfigTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index 9663e09f..963cd3fd 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -36,6 +36,29 @@ ecm_generate_headers(KConfigGui_HEADERS
REQUIRED_HEADERS KConfigGui_HEADERS
)
+find_package(PythonModuleGeneration)
+
+if (PythonModuleGeneration_FOUND)
+ ecm_generate_python_binding(
+ TARGET KF5::ConfigGui
+ PYTHONNAMESPACE PyKF5
+ MODULENAME KConfigGui
+ RULES_FILE "${CMAKE_SOURCE_DIR}/cmake/rules_PyKF5.py"
+ INSTALL_DIR_SUFFIX ${KDE_INSTALL_PYTHONBINDINGSDIR}
+ SIP_INCLUDES
+ "${CMAKE_BINARY_DIR}/src/core/sip"
+ SIP_DEPENDS
+ QtGui/QtGuimod.sip
+ PyKF5/KConfigCore/KConfigCoremod.sip
+ HEADERS
+ kconfiggui.h
+ kconfigloader.h
+ kconfigskeleton.h
+ kstandardshortcut.h
+ kwindowconfig.h
+ )
+endif()
+
install(TARGETS KF5ConfigGui EXPORT KF5ConfigTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES