Bug 147519 - Get ready to build DumpRenderTree with CMake
Summary: Get ready to build DumpRenderTree with CMake
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-31 18:17 PDT by Alex Christensen
Modified: 2015-08-05 16:03 PDT (History)
2 users (show)

See Also:


Attachments
Patch (9.88 KB, patch)
2015-07-31 18:27 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (10.34 KB, patch)
2015-08-05 15:34 PDT, Alex Christensen
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2015-07-31 18:17:42 PDT
There's still one symbol the linker can't find, but this is ready to upstream.
Comment 1 Alex Christensen 2015-07-31 18:27:31 PDT
Created attachment 257987 [details]
Patch
Comment 2 Martin Robinson 2015-07-31 19:31:07 PDT
Comment on attachment 257987 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=257987&action=review

Looks pretty good, but I have a few suggestions...

> Source/WebKit/CMakeLists.txt:22
> +    PRIVATE JavaScriptCore
> +    PRIVATE WTF
> +    PRIVATE WebCore

Small indentation issue here.

> Tools/DumpRenderTree/CMakeLists.txt:85
> +if (WIN32)
> +    add_library(DumpRenderTreeLib SHARED ${DumpRenderTree_SOURCES})
> +    set_target_properties(DumpRenderTreeLib PROPERTIES FOLDER "Tools")
> +    set_target_properties(DumpRenderTreeLib PROPERTIES OUTPUT_NAME "DumpRenderTree")
> +    target_link_libraries(DumpRenderTreeLib ${DumpRenderTree_LIBRARIES})
> +
> +    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
> +    add_executable(DumpRenderTree ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp)
> +    target_link_libraries(DumpRenderTree shlwapi)

I wonder if you could move this to the Windows specific CMake file by using the DumpRenderTree_SOURCES variable to add the DumpRenderTreeLib library and then resetting it to only contain ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp. I think that would allow you to remove the Windows-specific code form this file.
Comment 3 Alex Christensen 2015-08-05 15:34:12 PDT
Created attachment 258308 [details]
Patch
Comment 4 Brent Fulgham 2015-08-05 15:54:42 PDT
Comment on attachment 258308 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=258308&action=review

LGTM! r=me.

> Source/WebCore/CMakeLists.txt:-3297
> -    WebCore

Is this true for other platforms (EFL/GTK?)
Comment 5 Alex Christensen 2015-08-05 15:58:23 PDT
(In reply to comment #4)
> Comment on attachment 258308 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=258308&action=review
> 
> LGTM! r=me.
> 
> > Source/WebCore/CMakeLists.txt:-3297
> > -    WebCore
> 
> Is this true for other platforms (EFL/GTK?)
Yes, WebCoreTestSupport is a static library on all platforms currently, and their EWS bots are ok with this change.  If someone wants to make it a static library in the future for some reason, then they can, provided they don't break anything.
Comment 6 Alex Christensen 2015-08-05 16:03:23 PDT
Moved include from WebView.h to WebView.cpp
Committed to http://trac.webkit.org/changeset/187997