RESOLVED FIXED 154450
[cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
https://bugs.webkit.org/show_bug.cgi?id=154450
Summary [cmake] Moved library setup code to WEBKIT_FRAMEWORK macro.
Konstantin Tokarev
Reported 2016-02-19 06:19:45 PST
Moved library setup code to WEBKIT_FRAMEWORK macro.
Attachments
Patch (13.40 KB, patch)
2016-02-19 06:23 PST, Konstantin Tokarev
no flags
Patch (14.33 KB, patch)
2016-02-19 12:44 PST, Konstantin Tokarev
no flags
Patch (13.64 KB, patch)
2016-02-19 14:18 PST, Konstantin Tokarev
no flags
Patch (13.64 KB, patch)
2016-02-20 02:53 PST, Konstantin Tokarev
no flags
Patch (13.56 KB, patch)
2016-02-20 04:26 PST, Konstantin Tokarev
no flags
Patch (12.92 KB, patch)
2016-02-20 12:01 PST, Konstantin Tokarev
no flags
Konstantin Tokarev
Comment 1 2016-02-19 06:23:24 PST
Konstantin Tokarev
Comment 2 2016-02-19 12:44:39 PST
Konstantin Tokarev
Comment 3 2016-02-19 14:18:40 PST
Konstantin Tokarev
Comment 4 2016-02-20 02:53:36 PST
Konstantin Tokarev
Comment 5 2016-02-20 04:26:13 PST
Michael Catanzaro
Comment 6 2016-02-20 08:12:50 PST
Comment on attachment 271860 [details] Patch I think the value of moving this duplicate code to a macro probably outweighs the value of being explicit, so I'm OK with this. I want to give Alex and Martin a chance to chime in, though. I'm not sure about getting rid of WebKit2_DERIVED_SOURCES, because I think we might want to set different CPPFLAGS there to silence some warnings we currently have. And Alex has a patch introducing WebCore_DERIVED_SOURCES in bug #151399.
Konstantin Tokarev
Comment 7 2016-02-20 08:26:38 PST
(In reply to comment #6) > I think the value of moving this duplicate code to a macro probably > outweighs the value of being explicit, so I'm OK with this. It seems to me that there is established set of "standard" variables for each WebKit target that configure it. So this patch would not only reduce code size, but would also help to make target behavior more consistent in future. I'm planning to submit similar patches for binaries and non-framework libraries. Also, it would simplify addition of new configurable properties, e.g. in Qt port we would like to override precompiled header files via variables like WebCore_PRECOMPILED_HEADER. I want to give > Alex and Martin a chance to chime in, though. > > I'm not sure about getting rid of WebKit2_DERIVED_SOURCES, because I think > we might want to set different CPPFLAGS there to silence some warnings we > currently have. And Alex has a patch introducing WebCore_DERIVED_SOURCES in > bug #151399. Note that he adds WebCore_DERIVEDSOURCES, not WebCore_DERIVED_SOURCES, breaking "convention" of WebKit2. If we really need to use different flags on derived sources, I will add ${${_target}_DERIVED_SOURCES} to source list of target.
Konstantin Tokarev
Comment 8 2016-02-20 12:01:50 PST
Konstantin Tokarev
Comment 9 2016-02-20 12:16:45 PST
Restored DERIVED_SOURCES.
Alex Christensen
Comment 10 2016-02-22 10:32:18 PST
Comment on attachment 271864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271864&action=review > Source/WebKit2/CMakeLists.txt:-789 > - set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME}) I was under the impression set_target_properties only worked after the target had been made with add_library already. This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want.
Konstantin Tokarev
Comment 11 2016-02-22 10:38:43 PST
Comment on attachment 271864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271864&action=review >> Source/WebKit2/CMakeLists.txt:-789 >> - set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME}) > > I was under the impression set_target_properties only worked after the target had been made with add_library already. This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want. GTK+ port uses WebKit2_OUTPUT_NAME, and I've verified that it works.
Alex Christensen
Comment 12 2016-02-22 10:41:11 PST
Comment on attachment 271864 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=271864&action=review >>> Source/WebKit2/CMakeLists.txt:-789 >>> - set_target_properties(WebKit2 PROPERTIES OUTPUT_NAME ${WebKit2_OUTPUT_NAME}) >> >> I was under the impression set_target_properties only worked after the target had been made with add_library already. This is only used on Windows to my knowledge, and Windows EWS would report a successful build with different output names, which we would not want. > > GTK+ port uses WebKit2_OUTPUT_NAME, and I've verified that it works. ok, sounds good. I'll take a close look at the output after this lands, but I don't anticipate any problems, then.
WebKit Commit Bot
Comment 13 2016-02-22 11:32:44 PST
Comment on attachment 271864 [details] Patch Clearing flags on attachment: 271864 Committed r196947: <http://trac.webkit.org/changeset/196947>
WebKit Commit Bot
Comment 14 2016-02-22 11:32:50 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.