X11 automagic dependencies
Michael
kensington at astralcloak.net
Tue Apr 17 10:19:26 UTC 2012
Alexander Neundorf <neundorf <at> kde.org> writes:
>
> On Monday 16 April 2012, Michael wrote:
> > Hi,
> >
> > In kde-workspace, there are twelve optional X11 dependencies which are
> > automagic. I'd like to fix this by adding an option to disable at configure
> > time. Since macro_optional_find_package is of no use in this situation, is
> > there a better way to do this?
> >
> > +OPTION(WITH_XSHM "X shared memory support" ON)
> > +OPTION(WITH_XTEST "X11 Testing Resource extension library" ON)
> > +
> > +if (NOT WITH_XSHM)
> > + set(X11_XShm_FOUND FALSE)
> > +endif (NOT WITH_XSHM)
> > +if (NOT WITH_XTEST)
> > + set(X11_XTest_FOUND FALSE)
> > +endif (NOT WITH_XTEST)
> > +
>
> Why do you unset X11_Foo_FOUND using the option instead of wrapping the use of
> the resulting variables ?
>
> But no serious objections.
>
> Alex
>
No particular reason I did it that way. Is something like this in individual
CMakeLists better/preferred?
-if(X11_XTest_FOUND)
+if(WITH_XTEST AND X11_XTest_FOUND)
target_link_libraries(kded_khotkeys ${X11_XTest_LIB})
-endif(X11_XTest_FOUND)
+endif(WITH_XTEST AND X11_XTest_FOUND)
Best regards,
Michael
More information about the Kde-buildsystem
mailing list