diff options
author | Alex Merry <alex.merry@kde.org> | 2014-03-24 16:02:14 +0000 |
---|---|---|
committer | Alex Merry <alex.merry@kde.org> | 2014-03-25 10:21:42 +0000 |
commit | e1ad9a6192d1e2be6fcb17c8a1e961104d921752 (patch) | |
tree | da62d0b84d7e7b6a51cc5a3f6dcaea7ca7e486b1 | |
parent | d53cf39a20d3f3f23883ca9a6b154041ee094a8d (diff) | |
download | kconfig-e1ad9a6192d1e2be6fcb17c8a1e961104d921752.tar.gz kconfig-e1ad9a6192d1e2be6fcb17c8a1e961104d921752.tar.bz2 |
Use the full path for kconf_update when running it
It is not on $PATH, so we cannot just expect QProcess to find it.
REVIEW: 117023
-rw-r--r-- | src/core/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/core/kconfig.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 4e13ee5a..0b1136bc 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -19,6 +19,11 @@ add_library(KF5ConfigCore ${libkconfigcore_SRCS}) generate_export_header(KF5ConfigCore BASE_NAME KConfigCore) add_library(KF5::ConfigCore ALIAS KF5ConfigCore) +target_compile_definitions(KF5ConfigCore + PRIVATE + KCONF_UPDATE_INSTALL_LOCATION="${CMAKE_INSTALL_PREFIX}/${LIBEXEC_INSTALL_DIR}/$<TARGET_FILE_NAME:KF5::kconf_update>" +) + target_include_directories(KF5ConfigCore INTERFACE "$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}/KConfigCore>") target_link_libraries(KF5ConfigCore PUBLIC Qt5::Core) diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 5a4a083d..247a4c23 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -483,7 +483,7 @@ void KConfig::checkUpdate(const QString &id, const QString &updateFile) const QString cfg_id = updateFile + QLatin1Char(':') + id; const QStringList ids = cg.readEntry("update_info", QStringList()); if (!ids.contains(cfg_id)) { - QProcess::execute(QString::fromLatin1("kconf_update"), QStringList() << QString::fromLatin1("--check") << updateFile); + QProcess::execute(QStringLiteral(KCONF_UPDATE_INSTALL_LOCATION), QStringList() << QString::fromLatin1("--check") << updateFile); reparseConfiguration(); } } |