find_package(Foo REQUIRED)

Sebastian Trüg trueg at kde.org
Thu Jun 18 09:28:59 CEST 2009


the way I see it you simply have to make all dependencies non-REQUIRED and 
then in macro_log_feature mark them as required. That will make the summary 
terminate with an error. But only after printing the missing deps.
Works perfectly with K3b.

Cheers,
Sebastian

On Tuesday 16 June 2009 23:21:37 Allen Winter wrote:
> Howdy,
>
> Maybe this should be a feature of cmake itself.. but I wish for
> find_package(Foo REQUIRED) to print a nicer message
> if Foo is not found.
>
> We have the macro_log_feature() stuff for the optional packages
> which creates the nice summary at the end of the cmake run,
> but when required FOO is not found all we get is a terse error and quit.
>
> I wonder.. can we overload find_package() with a COMMENT option?
> i.e.
> find_package(Foo REQUIRED COMMENT "Foo is a critical library and this
> software cannot be build without it. Please install Foo
> <http://www.foo.org> version 2.9 or higher")
>
> and have the COMMENT printed on termination?
>
> Or maybe there is already something like this and I'm not seeing it?
>
> -Allen
>
>
>
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem



More information about the Kde-buildsystem mailing list