Version: (using KDE 4.2.4) Compiler: gcc-4.40 linux-2.6.30.1 glibc-2.10.1 OS: Linux Installed from: Compiled From Sources Even with the file /etc/kde/ksysguarddrc present, I get a boot-time warning of file '"/etc/kde/ksysguarddrc"' not found. This message appears in kde 4.2.90/95/96. To remove this warning I have made a simple one change to the file "ksysguard/ksysguardd/CMakeLists.txt", i.e., --- kdebase-workspace-4.2.96.old/ksysguard/ksysguardd/CMakeLists.txt 2009-06-17 16:07:40.000000000 -0400 +++ kdebase-workspace-4.2.96.new/ksysguard/ksysguardd/CMakeLists.txt 2009-07-09 20:17:01.448451888 -0400 @@ -5,7 +5,7 @@ # Laurent: Verify that we install it into (kdeprefix)/etc/ and not into /etc # otherwise it's necessary to change it. # into kde 3.x it was installed into /etc/ -add_definitions( -DKSYSGUARDDRCFILE=\"\\"${SYSCONF_INSTALL_DIR}/ksysguarddrc\\"\" ) +add_definitions( -DKSYSGUARDDRCFILE=\"${SYSCONF_INSTALL_DIR}/ksysguarddrc\" )
SVN commit 994705 by johnflux: Fix finding ksysguarddrc as suggested by John Stanley BUG:199734 M +1 -1 CMakeLists.txt WebSVN link: http://websvn.kde.org/?view=rev&revision=994705
it seems this fix has been lost somwhow, can it be committed again?
+krop The fix was reverted ages ago in http://quickgit.kde.org/?p=kde-workspace.git&a=commit&h=4c2df14400bf741f4910e3783e78860a06ec2755 but it is not clear to me why. Christophe, do you still remember why you did that or was it just an oversight?
Actually, I should ask Max instead; if I reapply the original commit here with CMake 3.1.3 the code just doesn't build, as the code in ksysguardd.c evaluates to #define KSYSGUARDDRCFILE /s/kde/etc/ksysguarddrc instead of #define KSYSGUARDDRCFILE "/s/kde/etc/ksysguarddrc"
Back then, the extra quoting was the only way to have '${SYSCONF_INSTALL_DIR}/ksysguarddrc' passed as parameter (due to some CMake CMPxxx policies set by kdelibs). On the other hand, ksysguard for an unknown reason was also supposed to build standalone but unconditionnaly adding 'cmake_minimum_required(VERSION 2.6.2)' was resetting the CMake policies to their default values.
(In reply to Raphael Kubo da Costa from comment #4) > Actually, I should ask Max instead; if I reapply the original commit here > with CMake 3.1.3 the code just doesn't build, as the code in ksysguardd.c > evaluates to > > #define KSYSGUARDDRCFILE /s/kde/etc/ksysguarddrc > > instead of > > #define KSYSGUARDDRCFILE "/s/kde/etc/ksysguarddrc" With kde-workspace-4.11.14, cmake-3.1.3 I have: ksysguardd.c:static const char *ConfigFile = KSYSGUARDDRCFILE; ksysguardd/CMakeFiles/ksysguardd.dir/flags.make:C_DEFINES = -DKSYSGUARDDRCFILE="\"\\\"/usr/local/etc/ksysguarddrc\\\"\"" -DOSTYPE_FreeBSD After patching: ksysguardd/CMakeFiles/ksysguardd.dir/flags.make:C_DEFINES = -DKSYSGUARDDRCFILE=\"/usr/local/etc/ksysguarddrc\" -DOSTYPE_FreeBSD
Note: a better fix for master would be to use a config file instead of relying on compilers parameters. there's already a config-ksysguardd.h.cmake that could be used for that purpose.