[webkit-dev] [cmake] Proposal: Move commonly used platform-dependent files in WebCore to .cmake include files.

Konstantin Tokarev annulen at yandex.ru
Wed Feb 10 10:20:29 PST 2016



09.02.2016, 22:19, "Alex Christensen" <achristensen at apple.com>:
>  Let’s go for it. Less duplication is a good thing. The only downside is the occasional “Which CMake file do I add this to?” but that should be just as straightforward as adding the file to multiple platform cmake files, if not more.

That's a really good point.

I've moved new cmake file to WebCore root which is less cluttered with files than WebCore/platform, and gave it more remarkable capitalization (*).

I've tried another (and probably more cmake'ish) approach is to use add_subdirectory() with CMakeLists.txt on lower levels, but hit an issue with CMake variable scoping: it is not trivial to ensure that CMakeLists.txt on all levels can modify the same WebCore_* variables.

First patch is here:
https://bugs.webkit.org/show_bug.cgi?id=154074

---
(*) My original idea was to put include files close to their source dirs and align with dir names, but that certainly does not work for multi-direcotry things like gstreamer.


>>   On Feb 9, 2016, at 10:44 AM, Michael Catanzaro <mcatanzaro at igalia.com> wrote:
>>
>>   I'm curious what Martin and Alex think about this. It seems fine to me;
>>   the downside is there are more CMake files to maintain, the upside is
>>   the big ones should be slightly smaller, and we can reduce duplication
>>   between PlatformEFL.cmake and PlatformGTK.cmake.
>>
>>   Michael
>>   _______________________________________________
>>   webkit-dev mailing list
>>   webkit-dev at lists.webkit.org
>>   https://lists.webkit.org/mailman/listinfo/webkit-dev


-- 
Regards,
Konstantin


More information about the webkit-dev mailing list