Title: [260539] trunk
Revision
260539
Author
[email protected]
Date
2020-04-22 16:41:38 -0700 (Wed, 22 Apr 2020)

Log Message

[CMake] Use WEBKIT_EXECUTABLE in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=210132

Reviewed by Adrian Perez de Castro.

.:

Add a WebKitTestRunner derived sources directory.

* Source/cmake/WebKitFS.cmake:

Tools:

Modify CMake code to use WEBKIT_EXECUTABLE when creating WebKitTestRunner.

* WebKitTestRunner/CMakeLists.txt:
* WebKitTestRunner/PlatformFTW.cmake:
* WebKitTestRunner/PlatformGTK.cmake:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/PlatformWin.cmake:

Modified Paths

Diff

Modified: trunk/ChangeLog (260538 => 260539)


--- trunk/ChangeLog	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/ChangeLog	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,3 +1,14 @@
+2020-04-22  Don Olmstead  <[email protected]>
+
+        [CMake] Use WEBKIT_EXECUTABLE in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=210132
+
+        Reviewed by Adrian Perez de Castro.
+
+        Add a WebKitTestRunner derived sources directory.
+
+        * Source/cmake/WebKitFS.cmake:
+
 2020-04-21  Adrian Perez de Castro  <[email protected]>
 
         [GTK][CMake] Make gtk-unix-print a component of FindGTK.cmake

Modified: trunk/Source/cmake/WebKitFS.cmake (260538 => 260539)


--- trunk/Source/cmake/WebKitFS.cmake	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Source/cmake/WebKitFS.cmake	2020-04-22 23:41:38 UTC (rev 260539)
@@ -49,6 +49,7 @@
 set(WebInspectorUI_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebInspectorUI")
 set(MiniBrowser_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/MiniBrowser")
 set(DumpRenderTree_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/DumpRenderTree")
+set(WebKitTestRunner_DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKitTestRunner")
 
 set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)
 

Modified: trunk/Tools/ChangeLog (260538 => 260539)


--- trunk/Tools/ChangeLog	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/ChangeLog	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,5 +1,20 @@
 2020-04-22  Don Olmstead  <[email protected]>
 
+        [CMake] Use WEBKIT_EXECUTABLE in WebKitTestRunner
+        https://bugs.webkit.org/show_bug.cgi?id=210132
+
+        Reviewed by Adrian Perez de Castro.
+
+        Modify CMake code to use WEBKIT_EXECUTABLE when creating WebKitTestRunner.
+
+        * WebKitTestRunner/CMakeLists.txt:
+        * WebKitTestRunner/PlatformFTW.cmake:
+        * WebKitTestRunner/PlatformGTK.cmake:
+        * WebKitTestRunner/PlatformWPE.cmake:
+        * WebKitTestRunner/PlatformWin.cmake:
+
+2020-04-22  Don Olmstead  <[email protected]>
+
         [CMake] Add WebKit::WebCoreTestSupport target
         https://bugs.webkit.org/show_bug.cgi?id=210867
 

Modified: trunk/Tools/WebKitTestRunner/CMakeLists.txt (260538 => 260539)


--- trunk/Tools/WebKitTestRunner/CMakeLists.txt	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/WebKitTestRunner/CMakeLists.txt	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,25 +1,26 @@
-set(WEBKIT_TESTRUNNER_DIR "${TOOLS_DIR}/WebKitTestRunner")
-set(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
-set(WEBKIT_TESTRUNNER_SHARED_DIR "${TOOLS_DIR}/TestRunnerShared/")
-set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR "${WEBKIT_TESTRUNNER_SHARED_DIR}/UIScriptContext")
-set(WEBKIT_TESTRUNNER_BINDINGS_DIR "${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings")
+set(WebKitTestRunner_DIR "${TOOLS_DIR}/WebKitTestRunner")
+set(WebKitTestRunner_SHARED_DIR "${TOOLS_DIR}/TestRunnerShared/")
+set(WebKitTestRunner_UISCRIPTCONTEXT_DIR "${WebKitTestRunner_SHARED_DIR}/UIScriptContext")
+set(WebKitTestRunner_BINDINGS_DIR "${WebKitTestRunner_SHARED_DIR}/Bindings")
 
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/UIScriptContext)
+file(MAKE_DIRECTORY ${WebKitTestRunner_DERIVED_SOURCES_DIR}/InjectedBundle)
+file(MAKE_DIRECTORY ${WebKitTestRunner_DERIVED_SOURCES_DIR}/UIScriptContext)
 
 set(WebKitTestRunner_SOURCES
-    ${WEBKIT_TESTRUNNER_DIR}/CyclicRedundancyCheck.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/GeolocationProviderMock.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/Options.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/PixelDumpSupport.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/TestController.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/TestInvocation.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/TestOptions.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/WebNotificationProvider.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/WorkQueueManager.cpp
-    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptContext.cpp
-    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptController.cpp
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
+    ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp
+
+    ${WebKitTestRunner_UISCRIPTCONTEXT_DIR}/UIScriptContext.cpp
+    ${WebKitTestRunner_UISCRIPTCONTEXT_DIR}/UIScriptController.cpp
+
+    CyclicRedundancyCheck.cpp
+    GeolocationProviderMock.cpp
+    Options.cpp
+    PixelDumpSupport.cpp
+    TestController.cpp
+    TestInvocation.cpp
+    TestOptions.cpp
+    WebNotificationProvider.cpp
+    WorkQueueManager.cpp
 )
 
 set(WebKitTestRunner_LIBRARIES
@@ -29,100 +30,103 @@
 )
 
 set(WebKitTestRunner_INCLUDE_DIRECTORIES
-    ${WEBKIT_TESTRUNNER_DIR}
-    ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle
-    ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
-    ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/atk
-    ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}
+    ${CMAKE_BINARY_DIR}
+    ${WebKitTestRunner_BINDINGS_DIR}
+    ${WebKitTestRunner_DERIVED_SOURCES_DIR}/UIScriptContext
+    ${WebKitTestRunner_DIR}
+    ${WebKitTestRunner_UISCRIPTCONTEXT_DIR}
+)
+
+list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
     ${WEBCORE_DIR}/testing/js
-    ${WEBKIT_DIR}/Platform/IPC
-    ${WEBKIT_DIR}/Shared
-    ${WEBKIT_DIR}/Shared/API/c
-    ${WEBKIT_DIR}/Shared/Plugins
-    ${WEBKIT_DIR}/UIProcess
-    ${WEBKIT_DIR}/UIProcess/API/C/soup
-    ${WEBKIT_DIR}/WebProcess/InjectedBundle
-    ${WEBKIT_DIR}/WebProcess/InjectedBundle/API/c
-    ${DERIVED_SOURCES_DIR}/InjectedBundle
-    ${DERIVED_SOURCES_DIR}/UIScriptContext
-    ${CMAKE_SOURCE_DIR}/Source
 )
 
-set(WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES
-    ${LIBSOUP_INCLUDE_DIRS}
+list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+    ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
 )
 
 set(WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityController.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarker.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarkerRange.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityUIElement.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/EventSendingController.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/GCController.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundle.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundleMain.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundlePage.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TestRunner.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TextInputController.cpp
+    ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp
 
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
+    InjectedBundle/AccessibilityController.cpp
+    InjectedBundle/AccessibilityTextMarker.cpp
+    InjectedBundle/AccessibilityTextMarkerRange.cpp
+    InjectedBundle/AccessibilityUIElement.cpp
+    InjectedBundle/EventSendingController.cpp
+    InjectedBundle/GCController.cpp
+    InjectedBundle/InjectedBundle.cpp
+    InjectedBundle/InjectedBundleMain.cpp
+    InjectedBundle/InjectedBundlePage.cpp
+    InjectedBundle/TestRunner.cpp
+    InjectedBundle/TextInputController.cpp
 )
 
+set(WebKitTestRunnerInjectedBundle_INCLUDE_DIRECTORIES
+    ${CMAKE_BINARY_DIR}
+    ${WebKitTestRunner_BINDINGS_DIR}
+    ${WebKitTestRunner_DERIVED_SOURCES_DIR}/InjectedBundle
+    ${WebKitTestRunner_DIR}
+    ${WebKitTestRunner_DIR}/InjectedBundle
+)
+
+list(APPEND WebKitTestRunnerInjectedBundle_INCLUDE_DIRECTORIES
+    ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
+)
+
+set(WebKitTestRunnerInjectedBundle_LIBRARIES
+    WebKit::WebCoreTestSupport
+    WebKit::WebKit
+)
+
 set(WebKitTestRunnerInjectedBundle_IDL_FILES
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityController.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarker.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarkerRange.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityUIElement.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/EventSendingController.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/GCController.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TestRunner.idl"
-    "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TextInputController.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityController.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityTextMarker.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/AccessibilityUIElement.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/EventSendingController.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/GCController.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/TestRunner.idl"
+    "${WebKitTestRunner_DIR}/InjectedBundle/Bindings/TextInputController.idl"
 )
 
 set(WebKitTestRunner_IDL_FILES
-    "${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
+    "${WebKitTestRunner_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
 )
 
+set(WebKitTestRunner_DEPENDENCIES
+    TestRunnerInjectedBundle
+    WebKitTestRunnerBindings
+)
+
 GENERATE_BINDINGS(WebKitTestRunnerInjectedBundleBindings
     OUTPUT_SOURCE WebKitTestRunnerInjectedBundle_SOURCES
     INPUT_FILES ${WebKitTestRunnerInjectedBundle_IDL_FILES}
-    BASE_DIR ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings
-    IDL_INCLUDES ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings
+    BASE_DIR ${WebKitTestRunner_DIR}/InjectedBundle/Bindings
+    IDL_INCLUDES ${WebKitTestRunner_DIR}/InjectedBundle/Bindings
     FEATURES ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}
-    DESTINATION ${DERIVED_SOURCES_DIR}/InjectedBundle
+    DESTINATION ${WebKitTestRunner_DERIVED_SOURCES_DIR}/InjectedBundle
     GENERATOR TestRunner)
 
 GENERATE_BINDINGS(WebKitTestRunnerBindings
     OUTPUT_SOURCE WebKitTestRunner_SOURCES
     INPUT_FILES ${WebKitTestRunner_IDL_FILES}
-    BASE_DIR ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings
-    IDL_INCLUDES ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings
+    BASE_DIR ${WebKitTestRunner_DIR}/InjectedBundle/Bindings
+    IDL_INCLUDES ${WebKitTestRunner_DIR}/InjectedBundle/Bindings
     FEATURES ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}
-    DESTINATION ${DERIVED_SOURCES_DIR}/UIScriptContext
+    DESTINATION ${WebKitTestRunner_DERIVED_SOURCES_DIR}/UIScriptContext
     GENERATOR TestRunner)
 
+WEBKIT_EXECUTABLE_DECLARE(WebKitTestRunner)
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
-include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
-include_directories(SYSTEM ${WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES})
-
 add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
-target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunnerInjectedBundle_LIBRARIES})
+target_include_directories(TestRunnerInjectedBundle PRIVATE ${WebKitTestRunnerInjectedBundle_INCLUDE_DIRECTORIES})
+target_link_libraries(TestRunnerInjectedBundle PRIVATE ${WebKitTestRunnerInjectedBundle_LIBRARIES})
 add_dependencies(TestRunnerInjectedBundle WebKitTestRunnerInjectedBundleBindings)
 
-add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
-target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
-add_dependencies(WebKitTestRunner WebKitTestRunnerBindings)
+WEBKIT_EXECUTABLE(WebKitTestRunner)
 
 if (COMPILER_IS_GCC_OR_CLANG)
     WEBKIT_ADD_TARGET_CXX_FLAGS(TestRunnerInjectedBundle -Wno-unused-parameter)
     WEBKIT_ADD_TARGET_CXX_FLAGS(WebKitTestRunner -Wno-unused-parameter)
 endif ()
-
-if (WIN32)
-    add_dependencies(WebKitTestRunnerLib WebKitTestRunnerBindings)
-    add_dependencies(WebKitTestRunner WebKitTestRunnerLib)
-elseif (NOT APPLE)
-    add_dependencies(WebKit ${ForwardingHeadersForWebKitTestRunner_NAME})
-endif ()

Modified: trunk/Tools/WebKitTestRunner/PlatformFTW.cmake (260538 => 260539)


--- trunk/Tools/WebKitTestRunner/PlatformFTW.cmake	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/WebKitTestRunner/PlatformFTW.cmake	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,74 +1,46 @@
-set(WebKitTestRunnerLib_SOURCES
-    ${WebKitTestRunner_SOURCES}
-    ${WEBKIT_TESTRUNNER_DIR}/win/TestInvocationDirect2D.cpp
+list(APPEND WebKitTestRunner_SOURCES
     win/EventSenderProxyWin.cpp
     win/PlatformWebViewWin.cpp
     win/TestControllerWin.cpp
+    win/TestInvocationDirect2D.cpp
+    win/UIScriptControllerWin.cpp
     win/main.cpp
 )
 
-set(WebKitTestRunner_SOURCES
-    ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
+set(wrapper_DEFINITIONS
+    USE_CONSOLE_ENTRY_POINT
+    WIN_CAIRO
 )
 
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/ActivateFontsWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/InjectedBundleWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/TestRunnerWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/AccessibilityControllerWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/AccessibilityUIElementWin.cpp
+    InjectedBundle/win/AccessibilityControllerWin.cpp
+    InjectedBundle/win/AccessibilityUIElementWin.cpp
+    InjectedBundle/win/ActivateFontsWin.cpp
+    InjectedBundle/win/InjectedBundleWin.cpp
+    InjectedBundle/win/TestRunnerWin.cpp
 )
 
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
-    win
-    ${FORWARDING_HEADERS_DIR}
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win
+    ${WebKitTestRunner_DIR}/InjectedBundle/win
 )
 
-set(WebKitTestRunnerLib_LIBRARIES
-    ${WebKitTestRunner_LIBRARIES}
+list(APPEND WebKitTestRunner_LIBRARIES
     Comsuppw
     Oleacc
 )
 
-list(APPEND WebKitTestRunner_LIBRARIES
-    WebKit
-)
+# Add precompiled header
+# JSWrapper.cpp is shared between the test runner and injected bundle so it can't be
+# present in the list of sources when the macro is invoked. Remove it, create the precompiled
+# header, and add it back to work around this.
+list(REMOVE_ITEM WebKitTestRunner_SOURCES ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp)
+WEBKIT_ADD_PRECOMPILED_HEADER("WebKitTestRunnerPrefix.h" "win/WebKitTestRunnerPrefix.cpp" WebKitTestRunner_SOURCES)
+list(APPEND WebKitTestRunner_SOURCES ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp)
 
-set(WebKitTestRunnerInjectedBundle_LIBRARIES
-    WebCoreTestSupport
-    WebKit
-)
-
-list(REMOVE_ITEM
-    WebKitTestRunnerLib_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-list(REMOVE_ITEM
-    WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-
-WEBKIT_ADD_PRECOMPILED_HEADER(WebKitTestRunnerPrefix.h
-    ${WEBKIT_TESTRUNNER_DIR}/win/WebKitTestRunnerPrefix.cpp
-    WebKitTestRunnerLib_SOURCES
-)
-
-list(APPEND
-    WebKitTestRunnerLib_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-list(APPEND
-    WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-
-
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKER_FLAGS}")
-add_library(WebKitTestRunnerLib SHARED ${WebKitTestRunnerLib_SOURCES})
-target_link_libraries(WebKitTestRunnerLib ${WebKitTestRunnerLib_LIBRARIES})
 
-add_definitions(
-    -DUSE_CONSOLE_ENTRY_POINT
-    -D_UNICODE
+WEBKIT_WRAP_EXECUTABLE(WebKitTestRunner
+    SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
+    LIBRARIES shlwapi
 )
+target_compile_definitions(WebKitTestRunner PRIVATE ${wrapper_DEFINITIONS})

Modified: trunk/Tools/WebKitTestRunner/PlatformGTK.cmake (260538 => 260539)


--- trunk/Tools/WebKitTestRunner/PlatformGTK.cmake	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/WebKitTestRunner/PlatformGTK.cmake	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,17 +1,16 @@
 add_custom_target(WebKitTestRunner-forwarding-headers
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --include-path ${WEBKIT_TESTRUNNER_SHARED_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WebKitTestRunner_DIR} --include-path ${WebKitTestRunner_SHARED_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
 )
+list(APPEND WebKitTestRunner_DEPENDENCIES WebKitTestRunner-forwarding-headers)
 
-set(ForwardingHeadersForWebKitTestRunner_NAME WebKitTestRunner-forwarding-headers)
-
 list(APPEND WebKitTestRunner_SOURCES
-    ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
+    cairo/TestInvocationCairo.cpp
 
-    ${WEBKIT_TESTRUNNER_DIR}/gtk/EventSenderProxyGtk.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/gtk/PlatformWebViewGtk.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/gtk/TestControllerGtk.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/gtk/UIScriptControllerGtk.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/gtk/main.cpp
+    gtk/EventSenderProxyGtk.cpp
+    gtk/PlatformWebViewGtk.cpp
+    gtk/TestControllerGtk.cpp
+    gtk/UIScriptControllerGtk.cpp
+    gtk/main.cpp
 )
 
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
@@ -19,38 +18,41 @@
 )
 
 list(APPEND WebKitTestRunner_SYSTEM_INCLUDE_DIRECTORIES
-    ${ATK_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
 )
 
 list(APPEND WebKitTestRunner_LIBRARIES
-    Cairo::Cairo
     ${ATK_LIBRARIES}
     ${GLIB_LIBRARIES}
+    Cairo::Cairo
     GTK::GTK
-    WebCore
 )
 
-set(WebKitTestRunnerInjectedBundle_LIBRARIES
+list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
     ${ATK_LIBRARIES}
     ${GLIB_LIBRARIES}
     Fontconfig::Fontconfig
     GTK::GTK
-    WebCoreTestSupport
-    WebKit
 )
 
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityControllerAtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityNotificationHandlerAtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityUIElementAtk.cpp
+    InjectedBundle/atk/AccessibilityControllerAtk.cpp
+    InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp
+    InjectedBundle/atk/AccessibilityUIElementAtk.cpp
 
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/gtk/ActivateFontsGtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/gtk/InjectedBundleGtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/gtk/InjectedBundleUtilities.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/gtk/TestRunnerGtk.cpp
+    InjectedBundle/gtk/ActivateFontsGtk.cpp
+    InjectedBundle/gtk/InjectedBundleGtk.cpp
+    InjectedBundle/gtk/InjectedBundleUtilities.cpp
+    InjectedBundle/gtk/TestRunnerGtk.cpp
 )
 
+list(APPEND WebKitTestRunnerInjectedBundle_INCLUDE_DIRECTORIES
+    ${ATK_INCLUDE_DIRS}
+    ${GLIB_INCLUDE_DIRS}
+    ${WebKitTestRunner_DIR}/InjectedBundle/atk
+    ${WebKitTestRunner_DIR}/InjectedBundle/gtk
+)
+
 add_definitions(
     -DFONTS_CONF_DIR="${TOOLS_DIR}/WebKitTestRunner/gtk/fonts"
     -DTOP_LEVEL_DIR="${CMAKE_SOURCE_DIR}"

Modified: trunk/Tools/WebKitTestRunner/PlatformWPE.cmake (260538 => 260539)


--- trunk/Tools/WebKitTestRunner/PlatformWPE.cmake	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/WebKitTestRunner/PlatformWPE.cmake	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,21 +1,19 @@
 add_custom_target(WebKitTestRunner-forwarding-headers
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WEBKIT_TESTRUNNER_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${WebKitTestRunner_DIR} --output ${FORWARDING_HEADERS_DIR} --platform wpe
 )
+list(APPEND WebKitTestRunner_DEPENDENCIES WebKitTestRunner-forwarding-headers)
 
-set(ForwardingHeadersForWebKitTestRunner_NAME WebKitTestRunner-forwarding-headers)
-
 list(APPEND WebKitTestRunner_SOURCES
-    ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
+    cairo/TestInvocationCairo.cpp
 
-    ${WEBKIT_TESTRUNNER_DIR}/wpe/EventSenderProxyWPE.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/wpe/PlatformWebViewWPE.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/wpe/TestControllerWPE.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/wpe/UIScriptControllerWPE.cpp
-    ${WEBKIT_TESTRUNNER_DIR}/wpe/main.cpp
+    wpe/EventSenderProxyWPE.cpp
+    wpe/PlatformWebViewWPE.cpp
+    wpe/TestControllerWPE.cpp
+    wpe/UIScriptControllerWPE.cpp
+    wpe/main.cpp
 )
 
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
-    ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/wpe
     ${FORWARDING_HEADERS_DIR}
     ${TOOLS_DIR}/wpe/backends
 )
@@ -28,29 +26,36 @@
 )
 
 list(APPEND WebKitTestRunner_LIBRARIES
-    Cairo::Cairo
     ${GLIB_LIBRARIES}
     ${LIBXKBCOMMON_LIBRARIES}
     ${WPEBACKEND_FDO_LIBRARIES}
+    Cairo::Cairo
     WPEToolingBackends
 )
 
-set(WebKitTestRunnerInjectedBundle_LIBRARIES
+list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
+    ${ATK_LIBRARIES}
+    ${GLIB_LIBRARIES}
     Cairo::Cairo
-    ${GLIB_LIBRARIES}
-    WebCoreTestSupport
-    WebKit
 )
 
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityControllerAtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityNotificationHandlerAtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityUIElementAtk.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/wpe/ActivateFontsWPE.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/wpe/InjectedBundleWPE.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/wpe/TestRunnerWPE.cpp
+    InjectedBundle/atk/AccessibilityControllerAtk.cpp
+    InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp
+    InjectedBundle/atk/AccessibilityUIElementAtk.cpp
+
+    InjectedBundle/wpe/ActivateFontsWPE.cpp
+    InjectedBundle/wpe/InjectedBundleWPE.cpp
+    InjectedBundle/wpe/TestRunnerWPE.cpp
 )
 
+list(APPEND WebKitTestRunnerInjectedBundle_INCLUDE_DIRECTORIES
+    ${ATK_INCLUDE_DIRS}
+    ${GLIB_INCLUDE_DIRS}
+    ${WebKitTestRunner_DIR}/InjectedBundle/atk
+    ${WebKitTestRunner_DIR}/InjectedBundle/wpe
+)
+
 add_definitions(
     -DFONTS_CONF_DIR="${TOOLS_DIR}/WebKitTestRunner/gtk/fonts"
     -DTOP_LEVEL_DIR="${CMAKE_SOURCE_DIR}"

Modified: trunk/Tools/WebKitTestRunner/PlatformWin.cmake (260538 => 260539)


--- trunk/Tools/WebKitTestRunner/PlatformWin.cmake	2020-04-22 23:09:57 UTC (rev 260538)
+++ trunk/Tools/WebKitTestRunner/PlatformWin.cmake	2020-04-22 23:41:38 UTC (rev 260539)
@@ -1,6 +1,6 @@
-set(WebKitTestRunnerLib_SOURCES
-    ${WebKitTestRunner_SOURCES}
-    ${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
+list(APPEND WebKitTestRunner_SOURCES
+    cairo/TestInvocationCairo.cpp
+
     win/EventSenderProxyWin.cpp
     win/PlatformWebViewWin.cpp
     win/TestControllerWin.cpp
@@ -8,72 +8,44 @@
     win/main.cpp
 )
 
-set(WebKitTestRunner_SOURCES
-    ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
+set(wrapper_DEFINITIONS
+    USE_CONSOLE_ENTRY_POINT
+    WIN_CAIRO
 )
 
 list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/ActivateFontsWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/InjectedBundleWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/TestRunnerWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/AccessibilityControllerWin.cpp
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win/AccessibilityUIElementWin.cpp
+    InjectedBundle/win/AccessibilityControllerWin.cpp
+    InjectedBundle/win/AccessibilityUIElementWin.cpp
+    InjectedBundle/win/ActivateFontsWin.cpp
+    InjectedBundle/win/InjectedBundleWin.cpp
+    InjectedBundle/win/TestRunnerWin.cpp
 )
 
-
 list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
-    cairo
-    win
-    ${FORWARDING_HEADERS_DIR}
-    ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/win
+    ${WebKitTestRunner_DIR}/InjectedBundle/win
 )
 
-
-set(WebKitTestRunnerLib_LIBRARIES
-    ${WebKitTestRunner_LIBRARIES}
+list(APPEND WebKitTestRunner_LIBRARIES
     Comsuppw
     Oleacc
 )
 
-set(WebKitTestRunner_LIBRARIES
-    shlwapi
+list(APPEND WebKitTestRunnerInjectedBundle_LIBRARIES
+    $<TARGET_OBJECTS:WebCoreTestSupport>
 )
 
-set(WebKitTestRunnerInjectedBundle_LIBRARIES
-    WebCoreTestSupport
-    WebKit
-)
+# Add precompiled header
+# JSWrapper.cpp is shared between the test runner and injected bundle so it can't be
+# present in the list of sources when the macro is invoked. Remove it, create the precompiled
+# header, and add it back to work around this.
+list(REMOVE_ITEM WebKitTestRunner_SOURCES ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp)
+WEBKIT_ADD_PRECOMPILED_HEADER("WebKitTestRunnerPrefix.h" "win/WebKitTestRunnerPrefix.cpp" WebKitTestRunner_SOURCES)
+list(APPEND WebKitTestRunner_SOURCES ${WebKitTestRunner_BINDINGS_DIR}/JSWrapper.cpp)
 
-list(REMOVE_ITEM
-    WebKitTestRunnerLib_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-list(REMOVE_ITEM
-    WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-
-WEBKIT_ADD_PRECOMPILED_HEADER(WebKitTestRunnerPrefix.h
-    ${WEBKIT_TESTRUNNER_DIR}/win/WebKitTestRunnerPrefix.cpp
-    WebKitTestRunnerLib_SOURCES
-)
-
-list(APPEND
-    WebKitTestRunnerLib_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-list(APPEND
-    WebKitTestRunnerInjectedBundle_SOURCES
-    ${WEBKIT_TESTRUNNER_BINDINGS_DIR}/JSWrapper.cpp
-)
-
-
 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKER_FLAGS}")
-add_library(WebKitTestRunnerLib SHARED ${WebKitTestRunnerLib_SOURCES})
-target_link_libraries(WebKitTestRunnerLib ${WebKitTestRunnerLib_LIBRARIES})
 
-add_definitions(
-    -DWIN_CAIRO
-    -DUSE_CONSOLE_ENTRY_POINT
-    -D_UNICODE
+WEBKIT_WRAP_EXECUTABLE(WebKitTestRunner
+    SOURCES ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp
+    LIBRARIES shlwapi
 )
+target_compile_definitions(WebKitTestRunner PRIVATE ${wrapper_DEFINITIONS})
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to