diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2014-05-07 20:40:48 +0200 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2014-05-07 20:48:16 +0200 |
commit | 94419b6f0cd469dc7cb0184a6fb48c1fe304c4d8 (patch) | |
tree | 1171622e05b6c1d4dc2cc02e0ced0f8af7a227bc /src | |
parent | 7544b8344254cc60dc18fac564ca5f24c52ce66b (diff) | |
download | kconfig-94419b6f0cd469dc7cb0184a6fb48c1fe304c4d8.tar.gz kconfig-94419b6f0cd469dc7cb0184a6fb48c1fe304c4d8.tar.bz2 |
Fix kconf_update test on Windows
We get a CMake warning for reading the LOCATION property, but I don't see
how else to do it (generator expressions don't seem to work)
Diffstat (limited to 'src')
-rw-r--r-- | src/kconf_update/CMakeLists.txt | 5 | ||||
-rw-r--r-- | src/kconf_update/config-kconf.h.cmake | 2 | ||||
-rw-r--r-- | src/kconf_update/kconf_update.cpp | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/kconf_update/CMakeLists.txt b/src/kconf_update/CMakeLists.txt index f75c31c8..fbee74a7 100644 --- a/src/kconf_update/CMakeLists.txt +++ b/src/kconf_update/CMakeLists.txt @@ -2,8 +2,6 @@ find_package(Qt5Core 5.2.0 REQUIRED NO_MODULE) remove_definitions(-DQT_NO_CAST_FROM_ASCII) -configure_file(config-kconf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconf.h ) - ########### next target ############### set(kconf_update_SRCS @@ -17,6 +15,9 @@ target_link_libraries(kconf_update Qt5::Core KF5::ConfigCore) include(ECMMarkNonGuiExecutable) ecm_mark_nongui_executable(kconf_update) +get_target_property(KCONF_UPDATE_EXECUTABLE kconf_update LOCATION) +configure_file(config-kconf.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kconf.h ) + # Although this is mostly an internal binary (hence installing it in # KF5_LIBEXEC_INSTALL_DIR), it is used by kded, and so we export its location install(TARGETS kconf_update EXPORT KF5ConfigTargets DESTINATION ${KF5_LIBEXEC_INSTALL_DIR}) diff --git a/src/kconf_update/config-kconf.h.cmake b/src/kconf_update/config-kconf.h.cmake index 0f70f8c8..a71608d2 100644 --- a/src/kconf_update/config-kconf.h.cmake +++ b/src/kconf_update/config-kconf.h.cmake @@ -1,4 +1,4 @@ #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" #define LIBEXEC_INSTALL_DIR "${LIBEXEC_INSTALL_DIR}" #define LIB_INSTALL_DIR "${LIB_INSTALL_DIR}" -#define KCONF_UPDATE_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" +#define KCONF_UPDATE_EXECUTABLE "${KCONF_UPDATE_EXECUTABLE}" diff --git a/src/kconf_update/kconf_update.cpp b/src/kconf_update/kconf_update.cpp index e82520c7..1bcbf7da 100644 --- a/src/kconf_update/kconf_update.cpp +++ b/src/kconf_update/kconf_update.cpp @@ -174,6 +174,7 @@ QTextStream & KonfUpdate::log() { if (!m_textStream) { +#if 0 QString dir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QLatin1Char('/') + "kconf_update/log"; QDir().mkpath(dir); QString file = dir + "/update.log"; @@ -184,6 +185,8 @@ KonfUpdate::log() // Error m_textStream = new QTextStream(stderr, QIODevice::WriteOnly); } +#endif + m_textStream = new QTextStream(stderr, QIODevice::WriteOnly); } (*m_textStream) << QDateTime::currentDateTime().toString(Qt::ISODate) << " "; |