You are not logged in.
Hey there I'm trying to start developing some KDE Plasma 5 widgets however whenever I attempt to build the tutorial widget I get the following error:
mathew@:hello_world_widget:-> cmake CMakeLists.txt
CMake Error at CMakeLists.txt:1 (plasma_install_package):
Unknown CMake command "plasma_install_package".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.1)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/mathew/projects/hello_world_widget/CMakeFiles/CMakeOutput.log".
mathew@:hello_world_widget:->
I have the extra-cmake-modules-git and cmake-git packages installed from the aur. I did attempt to use the cmake and extra-cmake-modules packages from the official repositories and it gave the same error. I googled for quite some time but could find no answers.
Offline
I have the same problem. It look like bug to me because I had downloaded PKGBUILD from official plasma-nm 5.1.2-1 package, tried to build this and I had the same message. I don't know in which package this CMake command "plasma_install_package" should be, so it's possible that something is missing in my system... Someone can help?
Offline
plasma_install_package is provided by plasma-framework
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib/cmake]|
└───╼ grep -R plasma_install_package
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(path componentname [root] [type])
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
KF5Plasma/KF5PlasmaMacros.cmake:macro(plasma_install_package dir component)
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib/cmake]|
└───╼ yaourt -Qo /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake
/usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake is owned by plasma-framework-git r13578.86e89dd-1
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[/usr/lib/cmake]|
└───╼ pkgfile KF5PlasmaMacros.cmake
extra/plasma-framework
Last edited by sl1pkn07 (2014-12-24 10:54:37)
Offline
aleksander ~/Pobrane/test $ cd /usr/lib/cmake/
aleksander /usr/lib/cmake $ grep -R plasma_install_package
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(path componentname [root] [type])
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
KF5Plasma/KF5PlasmaMacros.cmake:macro(plasma_install_package dir component)
aleksander /usr/lib/cmake $ pacaur -Qo /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake
/usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake is owned by plasma-framework 5.5.0-1
aleksander /usr/lib/cmake $ cd ~/Pobrane/test
aleksander ~/Pobrane/test $ cmake ./plasma-nm
CMake Error at CMakeLists.txt:1 (plasma_install_package):
Unknown CMake command "plasma_install_package".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.1)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/aleksander/Pobrane/test/plasma-nm/CMakeFiles/CMakeOutput.log".
Werid... Maybe some extra configuration of cmake is needed?
Offline
build for me with official and GIT versions :S
Last edited by sl1pkn07 (2014-12-24 14:53:42)
Offline
Version form git
aleksander ~/Pobrane/test $ cd /usr/lib/cmake/
aleksander /usr/lib/cmake $ grep -R plasma_install_package
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(path componentname [root] [type])
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(mywidget org.kde.plasma.mywidget) # installs an applet
KF5Plasma/KF5PlasmaMacros.cmake:# plasma_install_package(declarativetoolbox org.kde.toolbox packages package) # installs a generic package
KF5Plasma/KF5PlasmaMacros.cmake:macro(plasma_install_package dir component)
aleksander /usr/lib/cmake $ LANG=C pacaur -Qo /usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake
/usr/lib/cmake/KF5Plasma/KF5PlasmaMacros.cmake is owned by plasma-framework-git r13579.10a94ba-1
aleksander /usr/lib/cmake $ cd ~/Pobrane/test
aleksander ~/Pobrane/test $ cmake ./plasma-nm
CMake Error at CMakeLists.txt:1 (plasma_install_package):
Unknown CMake command "plasma_install_package".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.1)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/aleksander/Pobrane/test/plasma-nm/CMakeFiles/CMakeOutput.log".]
Offline
I got the same here...
CMake Error at CMakeLists.txt:3 (plasma_install_package):
Unknown CMake command "plasma_install_package".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 3.1)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/tmp/plasmoid/CMakeFiles/CMakeOutput.log".
You do not have any ideas on how to solve this problem?
Last edited by Ekaradon (2015-02-19 20:24:10)
Offline
This is just because the tutorial is shit.
From reading the top level CMakeLists.txt of of the plasma-workspace source and seeing that Kf5Plasma needs to be included with "grep -R plasma_install_package /usr/lib/cmake/" and some trial and error, this is an actual minimal CMakeLists.txt:
project(YOURPROJECT)
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
find_package(ECM 0.0.11 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
find_package(KF5Plasma)
plasma_install_package(YOURPROJECT org.kde.YOURPROJECT plasma/plasmoids applet)
Offline
There were two almost identical versions of the tutorial, one with a corrected CMakeLists.txt, the other was incomplete. I have meanwhile tried to fix the CMakeLists.txt file at https://techbase.kde.org/Development/Tu … ingStarted.
As for the error, even if the KF5Plasma cmake file does locate the ECM package, it does not modify the CMAKE_MODULE_PATH. Could be a bug / design decision.
Offline