RESOLVED WONTFIX 72238
[CMAKE] Move Efl specific list operations from WebKit/CMakeLists.txt to WebKit/efl/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=72238
Summary [CMAKE] Move Efl specific list operations from WebKit/CMakeLists.txt to WebKi...
Ryuan Choi
Reported 2011-11-13 21:39:42 PST
Because WebKit/CMakeLists.txt is platform independent, we should move soup and curl related includes to WebKit/efl/CMakeListsEfl.txt
Attachments
Patch (3.40 KB, patch)
2011-11-13 21:42 PST, Ryuan Choi
dbates: review-
Ryuan Choi
Comment 1 2011-11-13 21:42:16 PST
Ryuan Choi
Comment 2 2011-11-13 21:46:45 PST
Add cmake related guys in CCs.
Daniel Bates
Comment 3 2011-11-13 23:18:02 PST
Can you elaborate on how you came to the decision to move the LibSoup and cURL includes from WebKit/CMakeLists.txt to WebKit/efl/CMakeListsEfl.txt? From my understanding, both LibSoup and cURL are optional third-party libraries that any port can choose to use. At the time of writing, only the EFL port uses them. Notice that a port that chooses to use LibSoup or cURL will need to include the headers in ${WEBCORE_DIR}/platform/network/soup or ${WEBCORE_DIR}/platform/network/curl, respectively. So, there are a set of headers that are common to all ports that use LibSoup and cURL.
Ryuan Choi
Comment 4 2011-11-13 23:37:41 PST
(In reply to comment #3) > Can you elaborate on how you came to the decision to move the LibSoup and cURL includes from WebKit/CMakeLists.txt to WebKit/efl/CMakeListsEfl.txt? > > From my understanding, both LibSoup and cURL are optional third-party libraries that any port can choose to use. At the time of writing, only the EFL port uses them. Notice that a port that chooses to use LibSoup or cURL will need to include the headers in ${WEBCORE_DIR}/platform/network/soup or ${WEBCORE_DIR}/platform/network/curl, respectively. So, there are a set of headers that are common to all ports that use LibSoup and cURL. I thought that they are not common because other third-party libraries like cairo were not contained in CMakeLists.txt. For now, ${WEBCORE_DIR}/platform/network/soup was in both Source/WebKit/CMakeLists.txt and Source/WebCore/PlatformEfl.cmake. At least, I want to collect ${WEBCORE_DIR}/platform/network/soup and ${LIBSOUP24_INCLUDE_DIRS} in same build script.
Daniel Bates
Comment 5 2011-11-14 00:12:34 PST
(In reply to comment #4) > (In reply to comment #3) >> [...] > I thought that they are not common because other third-party libraries like cairo were not contained in CMakeLists.txt. I noticed that WebCore/CMakeListsEfl.txt has logic when building with Cairo. I am unclear how this Cairo logic is specific to EFL. I mean, all of the source files listed in the Cairo section of WebCore/CMakeListsEfl.txt seem Cairo-specific as opposed to EFL-specific and hence are common to any port that makes use of Cairo for their graphics backend. Maybe we consider sharing such Cairo logic by moving it to CMakeLists.txt? > > For now, ${WEBCORE_DIR}/platform/network/soup was in both Source/WebKit/CMakeLists.txt and Source/WebCore/PlatformEfl.cmake. > > At least, I want to collect ${WEBCORE_DIR}/platform/network/soup and ${LIBSOUP24_INCLUDE_DIRS} in same build script. As aforementioned, including the include directory ${WEBCORE_DIR}/platform/network/soup could be shared by all ports that use LibSoup and a similar argument can be made for cURL and ${WEBCORE_DIR}/platform/network/curl. Because the EFL port is the only CMake-based port that uses LibSoup and cURL (at the time of writing) we could move such logic to the EFL-specific CMake file, CMakeListsEfl.txt. Should another CMake-port choose to support either one or both of these network backends then we can revisit this issue of sharing the common build system parts in CMakeLists.txt.
Patrick R. Gansterer
Comment 6 2011-11-14 00:21:11 PST
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > >> [...] > > I thought that they are not common because other third-party libraries like cairo were not contained in CMakeLists.txt. > > I noticed that WebCore/CMakeListsEfl.txt has logic when building with Cairo. I am unclear how this Cairo logic is specific to EFL. I mean, all of the source files listed in the Cairo section of WebCore/CMakeListsEfl.txt seem Cairo-specific as opposed to EFL-specific and hence are common to any port that makes use of Cairo for their graphics backend. Maybe we consider sharing such Cairo logic by moving it to CMakeLists.txt? I already started to change other ports (Wx, gtk) to CMake build system and I had to duplicate many lines from the current PlatformEfl.cmake file. But unfortunally it's not as simple as on/off since some need only the include directories, others only a subset of cpp files. > > For now, ${WEBCORE_DIR}/platform/network/soup was in both Source/WebKit/CMakeLists.txt and Source/WebCore/PlatformEfl.cmake. > > > > At least, I want to collect ${WEBCORE_DIR}/platform/network/soup and ${LIBSOUP24_INCLUDE_DIRS} in same build script. > > As aforementioned, including the include directory ${WEBCORE_DIR}/platform/network/soup could be shared by all ports that use LibSoup and a similar argument can be made for cURL and ${WEBCORE_DIR}/platform/network/curl. > > Because the EFL port is the only CMake-based port that uses LibSoup and cURL (at the time of writing) we could move such logic to the EFL-specific CMake file, CMakeListsEfl.txt. Should another CMake-port choose to support either one or both of these network backends then we can revisit this issue of sharing the common build system parts in CMakeLists.txt. My basic idea is to move "bigger chunks" into UseXXX.cmake files, like we do already for the UseJSC.cmake and UseV8.cmake. But after some work it seams that the WebKit build system is very very very complex at the moment (every port does it a little bit different :-( ) and this approach might not be sufficent.
Ryuan Choi
Comment 7 2011-11-14 01:08:39 PST
(In reply to comment #6) > My basic idea is to move "bigger chunks" into UseXXX.cmake files, like we do already for the UseJSC.cmake and UseV8.cmake. But after some work it seams that the WebKit build system is very very very complex at the moment (every port does it a little bit different :-( ) and this approach might not be sufficent. IMHO, How do you think about creating XXX_BACKENDS_{INCLUDE_DIRS, SOURCES, LIBRARIES} variables for this issue? Below is simple example which I think. 1) OptionsCommon.cmake just declare NETWORK_BACKENDS_{INCLUDE_DIRS, SOURCES, LIBRARIES} as empty. 2) WebCore/PlatformeEfl.cmake choose WebCore/cmake/UseSoup.cmake to fill these variables. 3) WebCore/CMakeLists.txt append them into WebCore_INCLUDES, SOURCES, Libraries. 4) WebKit/CMakeLists.txt use NETWORK_BACKENDS_INCLUDE_DIRS. In my simple thinking, we need NETWORK_BACKENDS_XXX, GRAPHICS_BACKENDS_XXX, FONT_BACKENDS_XXX, AUDIO_BACKENDS_XXX. It's my two cents.
Note You need to log in before you can comment on or make changes to this bug.