Buildsystem changes for KWin mobile

Andreas Pakulat apaku at gmx.de
Mon Nov 29 23:24:32 CET 2010


On 29.11.10 22:10:04, Martin Gräßlin wrote:
> Hi,
> 
> please keep me CC-ed as I am not subscribed. Thanks
> 
> As you might know I am currently working on the OpenGL ES port of KWin and 
> have some build system related questions.
> 
> First a short explanation about the general problem: you can either compile 
> against OpenGL or OpenGL ES, but not both at the same time. ES is only a 
> subset of OpenGL and due to the various different versions we cannot restrict 
> on the subset (though I would like to do so). This means it has to be decided 
> at compile time whether OpenGL or OpenGL ES has to be used.
> 
> This would be fine for mobile, but the ES port is also very important for 
> desktop systems. It will give our users who are able to use ES a much more 
> modern and hopefully much faster compositing system and it is a hard 
> requirement for any work on Wayland[1].
> 
> So what I would like to have is: first build kwin with OpenGL, then build kwin 
> again with other options set for OpenGL ES. Is something like that possible?
> 
> KWin has several build targets. There is the effects library which is linked 
> against either OpenGL or ES. In the ES case symbols are removed and in future 
> probably some ES specific added. Then there are the effects which link against 
> this library and would need to be build twice as well, because we cannot 
> support all effects in ES yet.
> 
> Last but not least there is kwin core also linking the effects library and 
> using complete different code pathes for OpenGL or ES.
> 
> So what is the best way to tackle this issue? If you have further questions or 
> need the current changes to the CMake files, just let me know.

Unless my cmake-foo is lacking, the only way to somewhat cleanly handle
this with a single build directory is creating 2 targets for each
binary/library/plugin with differing names.  As you probably also need
to be able to specify different opengl include dirs you'll even have to
put the CMakeLists.txt containing the targets into separate subdirs as
the include paths given to CMake via include_directories are
per-directory.

Then a single make call will build both opengl and opengl-es versions
and create kwin_opengl and kwin_opengl-es or something similar.

The only other option would mean everybody who does want both will have
to use 2 separate build directories and use separate installation
prefixes for both so that the opengl version doesn't mix itself with the
opengl-es version (or use the OUTPUT_NAME property on the targets to
append something to the binary name).

Andreas

-- 
Your present plans will be successful.


More information about the Kde-buildsystem mailing list