You are not logged in.

#1 2014-11-20 00:51:51

ChasingLogic
Member
Registered: 2013-11-26
Posts: 3

CMake Unknown Command plasma_install_package

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

#2 2014-12-24 10:32:26

Aelspire
Member
Registered: 2014-12-24
Posts: 8

Re: CMake Unknown Command plasma_install_package

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

#3 2014-12-24 10:44:33

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: CMake Unknown Command plasma_install_package

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

#4 2014-12-24 12:40:07

Aelspire
Member
Registered: 2014-12-24
Posts: 8

Re: CMake Unknown Command plasma_install_package

 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

#5 2014-12-24 14:49:25

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: CMake Unknown Command plasma_install_package

build for me with official and GIT versions :S

Last edited by sl1pkn07 (2014-12-24 14:53:42)

Offline

#6 2014-12-24 20:20:34

Aelspire
Member
Registered: 2014-12-24
Posts: 8

Re: CMake Unknown Command plasma_install_package

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

#7 2015-02-19 20:14:39

Ekaradon
Member
Registered: 2014-05-31
Posts: 44

Re: CMake Unknown Command plasma_install_package

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

#8 2015-02-26 22:09:38

haagch
Member
Registered: 2013-08-17
Posts: 209

Re: CMake Unknown Command plasma_install_package

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

#9 2015-08-01 11:59:30

Lekensteyn
Member
From: Netherlands
Registered: 2012-06-19
Posts: 192
Website

Re: CMake Unknown Command plasma_install_package

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

Board footer

Powered by FluxBB