Use KSysGuard namespace for KSysGuard library targets
ClosedPublic

Authored by ahiemstra on Apr 30 2020, 3:08 PM.

Details

Summary

Instead of using KF5 which is wrong since KSysGuard isn't part of
frameworks.

This needs a follow up patch to the ksysguard repo to make it use the new
namespace.

For backward compatibility, a KF5SysGuardConfig file is still installed that
aliases the new targets, but mentions they are deprecated.

Test Plan

Still builds

Diff Detail

Repository
R111 KSysguard Library
Branch
lib_namespace
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 26139
Build 26157: arc lint + arc unit
ahiemstra created this revision.Apr 30 2020, 3:08 PM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 30 2020, 3:08 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ahiemstra requested review of this revision.Apr 30 2020, 3:08 PM
ahiemstra updated this revision to Diff 82193.May 7 2020, 11:39 AM
  • Add backward-compatibility package config file
ahiemstra edited the summary of this revision. (Show Details)May 7 2020, 11:44 AM
ahiemstra edited the summary of this revision. (Show Details)
davidedmundson accepted this revision.May 7 2020, 11:44 AM
This revision is now accepted and ready to land.May 7 2020, 11:44 AM
This revision was automatically updated to reflect the committed changes.

With this change, plasma-workspace fails to build on my system (Neon User, kdesrc-build)

Error message:

CMake Warning at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:27 (message):
  The KF5:: namespace for KSysGuard targets is deprecated.  Please use
  KSysGuard as namespace.
Call Stack (most recent call first):
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Error at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:34 (add_library):
  add_library cannot create ALIAS target "KF5::SysGuard" because target
  "KSysGuard::SysGuard" is IMPORTED.
Call Stack (most recent call first):
  /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:37 (add_sysguard_target)
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Error at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:34 (add_library):
  add_library cannot create ALIAS target "KF5::ProcessCore" because target
  "KSysGuard::ProcessCore" is IMPORTED.
Call Stack (most recent call first):
  /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:38 (add_sysguard_target)
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Error at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:34 (add_library):
  add_library cannot create ALIAS target "KF5::ProcessUi" because target
  "KSysGuard::ProcessUi" is IMPORTED.
Call Stack (most recent call first):
  /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:39 (add_sysguard_target)
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Error at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:34 (add_library):
  add_library cannot create ALIAS target "KF5::LsofUi" because target
  "KSysGuard::LsofUi" is IMPORTED.
Call Stack (most recent call first):
  /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:40 (add_sysguard_target)
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


CMake Error at /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:34 (add_library):
  add_library cannot create ALIAS target "KF5::SignalPlotter" because target
  "KSysGuard::SignalPlotter" is IMPORTED.
Call Stack (most recent call first):
  /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake:41 (add_sysguard_target)
  /home/konrad/kde/usr/share/ECM/find-modules/FindKF5.cmake:74 (find_package)
  CMakeLists.txt:55 (find_package)


-- Found KF5SysGuard: /home/konrad/kde/usr/lib/x86_64-linux-gnu/cmake/KF5SysGuard/KF5SysGuardConfig.cmake

Which version of CMake are you using? I needed to promote the imported KSysGuard targets to "global" using set_target_property. Without that, I saw similar errors. The IMPORTED_GLOBAL property was added in CMake 3.11.

Which version of CMake are you using? I needed to promote the imported KSysGuard targets to "global" using set_target_property. Without that, I saw similar errors. The IMPORTED_GLOBAL property was added in CMake 3.11.

Cmake version: 3.10.2

Is is a default in Neon, based on Ubuntu 18.04.

Please see if D29529 resolves it.