DBusMenuQt5 cmake foo

Alexander Neundorf neundorf at kde.org
Sat Aug 31 16:16:57 UTC 2013


On Saturday 31 August 2013, David Faure wrote:
> On Saturday 31 August 2013 02:51:09 Sebastian Kügler wrote:
> > So I've tried both alternative, changing both calls to either DBusMenuQt
> > or DBusMenuQt5, but neither of them works, both break over the package
> > not being found, but required.
> > I've looked for a *Config.cmake file (as suggested), none on my system.
> > The libdbusmenu-qt repo doesn't install any cmake files, and the
> > kde-workspace repo doesn't have it, either. Where should this file come
> > from?
> 
> Right, there isn't one.
> This is the typical confusing cmake error message: it's looking for FindFoo
> and if there isn't one, it's looking for FooConfig.cmake, and when it
> fails, it tells you it can't find a FooConfig.cmake. But here the actually
> issue is the missing FindFoo.


My recommendation is to always use the "MODULE" keyword in find_package() when 
a Find-module is used, and to always use the "NO_MODULE" or "CONFIG" keyword 
if no Find-module is used.
This makes it clear for everybody what is used for searching, and cmake can 
report on exactly that.

Beside that, I think the error message explains in detail what went wrong:

"CMake Warning at CMakeLists.txt:83 (find_package):
  By not providing "FindDBusMenuQt5.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "DBusMenuQt5", but CMake did not find one.

  Could not find a package configuration file provided by "DBusMenuQt5" with
  any of the following names:

    DBusMenuQt5Config.cmake
    dbusmenuqt5-config.cmake"

If you have suggestions how to improve it, I'm happy to hear.

Alex


More information about the Kde-frameworks-devel mailing list