On Thursday 29 June 2006 16:35, Alexander Neundorf wrote: > On Thursday 29 June 2006 21:55, Allen Winter wrote: > > What's the best cmake command to find an installed cmake module? > > find_package() is used often in our CMakeLists.txt files, but I wonder > > if there isn't something better. > > > > For example: > > The kdepimlibs package installs KDEPIMLib.cmake into > > $top/share/apps/cmake/modules > > > > Near the top of kdepim/CMakeLists.txt I have the line > > "find_package(KDEPIMLib REQUIRED)". If that file is not found, cmake prints > > the following and exits: > > CMake Error: KDEPIMLib_DIR is not set. It must be set to the directory > > containing\ KDEPIMLibConfig.cmake in order to use KDEPIMLib. > > > > What I'd rather have is a cmake command that looks in a path for a file, > > and if that file is not found a nice error message is printed (maybe > > something I can specify) and then, based on the REQUIRED option, aborts > > cmake. > > > > Does something like this already exist? > > This is an issue which is not yet solved perfectly in cmake, the developers > are currently disussing a good solution. > > For kdepimlib: > > There should also be a > find_package(KDE4) > It is there.
> Once this succeeded, the CMAKE_MODULE_PATH (where cmake searches for modules) > should be set so that $top/share/apps/cmake/modules/ is part of it. > Then KDEPIMlib should be found automatically. Well, it is found if it is installed. The problem is when it isn't installed. Like if someone is trying to build kdepim without installing kdepimlibs first. > I'll have a closer look at it in the next days. > Thanks Alex. -- Let's Keep the Political Talk Out of KDE PLEASE _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem