On Saturday 02 July 2011 22:53:20 you wrote: > On Wednesday 29 June 2011, Martin Gräßlin wrote: > > Hi Buildsystem experts, > > > > I am currently facing an issue with build system changes for KWin where I > > do not know whether what I want to achieve is possible at all and if it is > > how to implement it. > > > > First some context: > > In 4.7 KWin can be built either with OpenGL/GLX or OpenGL ES 2/EGL support. > > OpenGL ES 2 is a subset (and superset) of OpenGL 2. This means we have to > > ifdef all the OpenGL code not available in OpenGL ES. It also means that > > distros have to build two packages if they want to offer kwin with GLES > > support. > > > > I would like to change this in a way that kwin is built twice, once with > > OpenGL and once with OpenGL ES. I think I need to have the same set of > > sources used in different targets. Therefore I need to change the define > > values, e.g. when building for OpenGL I don't want to have OpenGL ES > > defined and vice versa. > > > > Is that possible through cmake? I tried with configure_file but did not > > succeed so far. > > You can e.g. use the same list of source files for two targets, and use > set_target_properties(... COMPILE_FLAGS ...) to give them a different - > DKWIN_SOMETHING=GLES. Thanks for the hint, that works awesomely, I just added a review request with exactly what I wanted (#101979). > > You may also make a static library from some of the source files so not > everything has to be compiled twice. Would be nice, unfortunately kwin is a kdeinit project, so no static libraries :-( > > Is this what you want ? Yes :-)
Cheers Martin
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
