Paulo Jorge Guedes wrote: >> -----Original Message----- >> From: Paulo Jorge Guedes [mailto:[EMAIL PROTECTED] >> Sent: terça-feira, 20 de Junho de 2006 19:16 >> To: [email protected] >> Subject: RE: Suggested patch for FindOpenGL.cmake >> >>> -----Original Message----- >>> From: David Faure [mailto:[EMAIL PROTECTED] >>> Sent: terça-feira, 20 de Junho de 2006 9:27 >>> To: [email protected] >>> Subject: Re: Suggested patch for FindOpenGL.cmake >>> >>> On Monday 19 June 2006 22:12, Alexander Neundorf wrote: >>>> On Monday 19 June 2006 00:14, David Faure wrote: >>>>> Why look for X11 again, if we did so already before? >>>>> [e.g. due to FindQt4.cmake] >>>>> This should save a bit of time in reconfiguring, since FindX11 has a >>> rather >>>>> large set of checks (it's even larger in kde's version of it, due to >>>>> additional libs), and since FindX11 doesn't have a fast path when >>> things >>>>> are in the cache already (it rechecks every time). >>>> Does this have a measurable effect ? >>> It has at least the effect that I dont see "Xpm not found" 4 times in >>> kdebase :) >>> >>>> Detecting the stuff (the find_xxx() calls) automatically uses the >> cache. >>> Take a look at our FindX11.cmake - there is a lot going on there, not >> just >>> find_xxx. >> 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? -Brad _______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
