Changeset 260341 in webkit


Ignore:
Timestamp:
Apr 19, 2020 11:12:40 AM (4 years ago)
Author:
don.olmstead@sony.com
Message:

[CMake] Consolidate TestNetscapePlugin build
https://bugs.webkit.org/show_bug.cgi?id=210691

Reviewed by Fujii Hironori.

The DumpRenderTree CMakeLists.txt contained a definition of TestNetscapePlugIn
which was used for WebKitLegacy ports. The TestNetscapePlugIn directory also had
a CMakeLists.txt used by GTK for its port. The definitions in DumpRenderTree's
CMake are moved into the TestNetscapePlugIn CMake to provide a common definition
for all ports that ENABLE_NETSCAPE_PLUGIN_API.

  • DumpRenderTree/CMakeLists.txt:
  • DumpRenderTree/PlatformWin.cmake:
  • DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
  • DumpRenderTree/TestNetscapePlugIn/PlatformGTK.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/PlatformWin.cmake: Added.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.def: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.def.
  • DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.rc: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.rc.
  • DumpRenderTree/TestNetscapePlugIn/win/resource.h: Renamed from Tools/DumpRenderTree/win/resource.h.
Location:
trunk/Tools
Files:
2 added
4 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r260339 r260341  
     12020-04-19  Don Olmstead  <don.olmstead@sony.com>
     2
     3        [CMake] Consolidate TestNetscapePlugin build
     4        https://bugs.webkit.org/show_bug.cgi?id=210691
     5
     6        Reviewed by Fujii Hironori.
     7
     8        The DumpRenderTree CMakeLists.txt contained a definition of TestNetscapePlugIn
     9        which was used for WebKitLegacy ports. The TestNetscapePlugIn directory also had
     10        a CMakeLists.txt used by GTK for its port. The definitions in DumpRenderTree's
     11        CMake are moved into the TestNetscapePlugIn CMake to provide a common definition
     12        for all ports that ENABLE_NETSCAPE_PLUGIN_API.
     13
     14        * DumpRenderTree/CMakeLists.txt:
     15        * DumpRenderTree/PlatformWin.cmake:
     16        * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
     17        * DumpRenderTree/TestNetscapePlugIn/PlatformGTK.cmake: Added.
     18        * DumpRenderTree/TestNetscapePlugIn/PlatformWin.cmake: Added.
     19        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.def: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.def.
     20        * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugIn.rc: Renamed from Tools/DumpRenderTree/win/TestNetscapePlugin.rc.
     21        * DumpRenderTree/TestNetscapePlugIn/win/resource.h: Renamed from Tools/DumpRenderTree/win/resource.h.
     22
    1232020-04-19  Emilio Cobos Álvarez  <emilio@crisal.io>
    224
  • trunk/Tools/DumpRenderTree/CMakeLists.txt

    r259617 r260341  
    4848)
    4949
    50 set(TestNetscapePlugIn_SOURCES
    51     TestNetscapePlugIn/PluginObject.cpp
    52     TestNetscapePlugIn/PluginTest.cpp
    53     TestNetscapePlugIn/TestObject.cpp
    54     TestNetscapePlugIn/main.cpp
    55 
    56     TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp
    57     TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp
    58     TestNetscapePlugIn/Tests/FormValue.cpp
    59     TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp
    60     TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp
    61     TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp
    62     TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
    63     TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp
    64     TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
    65     TestNetscapePlugIn/Tests/NPPNewFails.cpp
    66     TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp
    67     TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp
    68     TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp
    69     TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp
    70     TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
    71     TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
    72     TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp
    73     TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp
    74     TestNetscapePlugIn/Tests/PrivateBrowsing.cpp
    75     TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp
    76     TestNetscapePlugIn/Tests/URLRedirect.cpp
    77 )
    78 
    79 set(TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES
    80     ${CMAKE_BINARY_DIR}
    81     ${DumpRenderTree_DIR}/TestNetscapePlugIn
    82     ${DumpRenderTree_DIR}/TestNetscapePlugIn/ForwardingHeaders
    83     ${DumpRenderTree_DIR}/TestNetscapePlugIn/Tests
    84 )
    85 
    86 list(APPEND TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES
    87     ${PAL_FRAMEWORK_HEADERS_DIR}
    88     ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
    89     ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
    90 )
    91 
    92 set(TestNetscapePlugIn_LIBRARIES
    93     WebCoreTestSupport
    94     WebKit::JavaScriptCore
    95 )
    96 
    9750set(DumpRenderTree_IDL_FILES
    9851    "${WebKitTestRunner_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
     
    11568
    11669if (ENABLE_NETSCAPE_PLUGIN_API)
    117     add_library(TestNetscapePlugIn SHARED ${TestNetscapePlugIn_SOURCES})
    118     target_include_directories(TestNetscapePlugIn PRIVATE ${TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES})
    119     target_link_libraries(TestNetscapePlugIn PRIVATE ${TestNetscapePlugIn_LIBRARIES})
     70    add_subdirectory(TestNetscapePlugIn)
    12071endif ()
  • trunk/Tools/DumpRenderTree/PlatformWin.cmake

    r259617 r260341  
    2424)
    2525
    26 list(APPEND TestNetscapePlugIn_SOURCES
    27     win/TestNetscapePlugin.def
    28     win/TestNetscapePlugin.rc
    29 
    30     TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp
    31     TestNetscapePlugIn/Tests/win/DrawsGradient.cpp
    32     TestNetscapePlugIn/Tests/win/DumpWindowRect.cpp
    33     TestNetscapePlugIn/Tests/win/GetValueNetscapeWindow.cpp
    34     TestNetscapePlugIn/Tests/win/NPNInvalidateRectInvalidatesWindow.cpp
    35     TestNetscapePlugIn/Tests/win/WindowGeometryInitializedBeforeSetWindow.cpp
    36     TestNetscapePlugIn/Tests/win/WindowRegionIsSetToClipRect.cpp
    37     TestNetscapePlugIn/Tests/win/WindowlessPaintRectCoordinates.cpp
    38 
    39     TestNetscapePlugIn/win/WindowGeometryTest.cpp
    40     TestNetscapePlugIn/win/WindowedPluginTest.cpp
    41 )
    42 
    4326set(wrapper_DEFINITIONS USE_CONSOLE_ENTRY_POINT)
    44 
    45 list(APPEND TestNetscapePlugIn_LIBRARIES
    46     Msimg32
    47     Shlwapi
    48     WebKitLegacy
    49 )
    5027
    5128list(APPEND DumpRenderTree_PRIVATE_INCLUDE_DIRECTORIES
    5229    ${DumpRenderTree_DIR}/win
    53 )
    54 
    55 list(APPEND TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES
    56     ${DumpRenderTree_DIR}/TestNetscapePlugIn/win
    57     ${DumpRenderTree_DIR}/TestNetscapePlugIn/Tests/win
    5830)
    5931
  • trunk/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt

    r260277 r260341  
    1 set(WEBKIT_TESTNETSCAPEPLUGIN_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
     1set(TestNetscapePlugIn_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
     2set(TestNetscapePlugIn_LIBRARY_TYPE SHARED)
    23
    3 set(WebKitTestNetscapePlugIn_SOURCES
    4     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginObject.cpp
    5     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginTest.cpp
    6     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/TestObject.cpp
    7     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/main.cpp
     4set(TestNetscapePlugIn_SOURCES
     5    PluginObject.cpp
     6    PluginTest.cpp
     7    TestObject.cpp
     8    main.cpp
    89
    9     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/DocumentOpenInDestroyStream.cpp
    10     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/EvaluateJSAfterRemovingPluginElement.cpp
    11     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/FormValue.cpp
    12     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp
    13     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetURLWithJavaScriptURL.cpp
    14     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp
    15     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
    16     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/LogNPPSetWindow.cpp
    17     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
    18     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPPNewFails.cpp
    19     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPPSetWindowCalledDuringDestruction.cpp
    20     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPRuntimeCallsWithNullNPP.cpp
    21     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp
    22     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPRuntimeRemoveProperty.cpp
    23     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NullNPPGetValuePointer.cpp
    24     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PassDifferentNPPStruct.cpp
    25     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PluginScriptableNPObjectInvokeDefault.cpp
    26     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PluginScriptableObjectOverridesAllProperties.cpp
    27     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PrivateBrowsing.cpp
    28     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/ToStringAndValueOfObject.cpp
    29     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/URLRedirect.cpp
     10    Tests/DocumentOpenInDestroyStream.cpp
     11    Tests/EvaluateJSAfterRemovingPluginElement.cpp
     12    Tests/FormValue.cpp
     13    Tests/GetURLNotifyWithURLThatFailsToLoad.cpp
     14    Tests/GetURLWithJavaScriptURL.cpp
     15    Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp
     16    Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
     17    Tests/LogNPPSetWindow.cpp
     18    Tests/NPDeallocateCalledBeforeNPShutdown.cpp
     19    Tests/NPPNewFails.cpp
     20    Tests/NPPSetWindowCalledDuringDestruction.cpp
     21    Tests/NPRuntimeCallsWithNullNPP.cpp
     22    Tests/NPRuntimeObjectFromDestroyedPlugin.cpp
     23    Tests/NPRuntimeRemoveProperty.cpp
     24    Tests/NullNPPGetValuePointer.cpp
     25    Tests/PassDifferentNPPStruct.cpp
     26    Tests/PluginScriptableNPObjectInvokeDefault.cpp
     27    Tests/PluginScriptableObjectOverridesAllProperties.cpp
     28    Tests/PrivateBrowsing.cpp
     29    Tests/ToStringAndValueOfObject.cpp
     30    Tests/URLRedirect.cpp
    3031)
    3132
    32 set(WebKitTestNetscapePlugIn_INCLUDE_DIRECTORIES
    33     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}
    34     ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/ForwardingHeaders
    35     ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
    36     ${WTF_DIR}
     33set(TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES
     34    ${TestNetscapePlugIn_DIR}
     35    ${TestNetscapePlugIn_DIR}/ForwardingHeaders
     36    ${TestNetscapePlugIn_DIR}/Tests
    3737)
    3838
    39 set(WebKitTestNetscapePlugIn_LIBRARIES
     39set(TestNetscapePlugIn_LIBRARIES
    4040    WebKit::WTF
    4141)
    4242
    43 if (MOZ_X11)
    44     set(WebKitTestNetscapePlugIn_SYSTEM_INCLUDE_DIRECTORIES
    45         ${X11_INCLUDE_DIR}
    46     )
     43# The ForwardingHeaders directory contains np*.h which are copied from WebCore
     44# so depend on the WebKit::WebCore target when building
     45set(TestNetscapePlugIn_DEPENDENCIES WebKit::WebCore)
     46list(APPEND TestNetscapePlugIn_PRIVATE_INCLUDE_DIRECTORIES ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR})
    4747
    48     list(APPEND WebKitTestNetscapePlugIn_LIBRARIES
    49         ${X11_LIBRARIES}
    50     )
     48WEBKIT_FRAMEWORK_DECLARE(TestNetscapePlugIn)
     49WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
     50WEBKIT_FRAMEWORK(TestNetscapePlugIn)
    5151
    52     add_definitions(-DMOZ_X11)
     52if (COMPILER_IS_GCC_OR_CLANG)
     53    WEBKIT_ADD_TARGET_CXX_FLAGS(TestNetscapePlugIn -Wno-unused-parameter)
    5354endif ()
    54 
    55 if (XP_UNIX)
    56     list(APPEND WebKitTestNetscapePlugIn_SOURCES
    57         ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/unix/CallInvalidateRectWithNullNPPArgument.cpp
    58     )
    59 
    60     add_definitions(-DXP_UNIX)
    61 endif ()
    62 
    63 include_directories(${WebKitTestNetscapePlugIn_INCLUDE_DIRECTORIES})
    64 include_directories(SYSTEM ${WebKitTestNetscapePlugIn_SYSTEM_INCLUDE_DIRECTORIES})
    65 
    66 add_library(TestNetscapePlugIn SHARED ${WebKitTestNetscapePlugIn_SOURCES})
    67 target_link_libraries(TestNetscapePlugIn ${WebKitTestNetscapePlugIn_LIBRARIES})
    68 add_dependencies(TestNetscapePlugIn WebKit::WebCore)
    69 set_target_properties(TestNetscapePlugIn PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/plugins)
    70 
    71 WEBKIT_ADD_TARGET_CXX_FLAGS(TestNetscapePlugIn -Wno-unused-parameter)
Note: See TracChangeset for help on using the changeset viewer.