Suggested patch for FindOpenGL.cmake

Paulo Moura Guedes moura at kdewebdev.org
Tue Jun 20 21:26:00 CEST 2006


On Tuesday 20 June 2006 20:09, Brad King wrote:
> >> I think this is screaming to be automated. It would be great if cmake
> >> could offer some mechanism to do this checking automatically.
> >> Perhaps some list where we could add the variables that would define if
> >> the checking for a particular module is completed, e.g.:
> >>
> >> FindX11.cmake:
> >>
> >> set_required_vars(X11_FOUND)
> >>
> >> Then, cmake would automatically check the required vars at the beginning
> >> of each module and would return if they were satisfied, and the user
> >> could happily try to find the packages without worrying about
> >> performance or output.
> >>
> >> What do you think?
> >
> > Maybe this could be even easier.
> > It seems to be a standard to define a variable named "FOOBAR_FOUND" for a
> > "FindFoobar.cmake" module. This means that "FOOBAR_FOUND" could be
> > automatically added to the required variable list so that, in the
> > majority of the cases, the user shouldn't have to write any code at all
> > (if he follows this standard).
>
> FindOpenGL.cmake could use the line
>
>    FIND_PACKAGE(X11)
>
> to look for the X11 package.  We could add a short-cut in FIND_PACKAGE
> to skip doing anything if X11_FOUND is already set to true.  Does this
> do what you want?

You mean to add an if condition in FindX11.cmake? That would do it, but just 
for X11...

Paulo


More information about the Kde-buildsystem mailing list