104b9d8a824d99b098d7100075b4efb2d62585a3
[WebKit-https.git] / Tools / DumpRenderTree / CMakeLists.txt
1 set(WEBKIT_TESTRUNNER_SHARED_DIR "${TOOLS_DIR}/TestRunnerShared/")
2 set(WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR "${TOOLS_DIR}/TestRunnerShared/UIScriptContext")
3 set(DUMP_RENDER_TREE_BINDINGS_DIR "${TOOLS_DIR}/DumpRenderTree/Bindings")
4
5 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/DumpRenderTree)
6
7 set(DumpRenderTree_SOURCES
8     AccessibilityController.cpp
9     AccessibilityTextMarker.cpp
10     AccessibilityUIElement.cpp
11     CyclicRedundancyCheck.cpp
12     DumpRenderTreeCommon.cpp
13     GCController.cpp
14     JavaScriptThreading.cpp
15     PixelDumpSupport.cpp
16     TestRunner.cpp
17     WorkQueue.cpp
18     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptContext.cpp
19     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/UIScriptController.cpp
20     ${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings/JSWrapper.cpp
21 )
22
23 set(DumpRenderTree_LIBRARIES
24     JavaScriptCore
25     WebCoreTestSupport
26 )
27
28 set(DumpRenderTree_INCLUDE_DIRECTORIES
29     ${DERIVED_SOURCES_DIR}/DumpRenderTree
30     ${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}
31     ${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings
32     ${TOOLS_DIR}/DumpRenderTree
33     ${CMAKE_SOURCE_DIR}/Source
34     ${WEBCORE_DIR}/testing/js
35 )
36
37 set(TestNetscapePlugIn_SOURCES
38     TestNetscapePlugIn/PluginObject.cpp
39     TestNetscapePlugIn/PluginTest.cpp
40     TestNetscapePlugIn/TestObject.cpp
41     TestNetscapePlugIn/main.cpp
42
43     TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp
44     TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp
45     TestNetscapePlugIn/Tests/FormValue.cpp
46     TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp
47     TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp
48     TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp
49     TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
50     TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp
51     TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
52     TestNetscapePlugIn/Tests/NPPNewFails.cpp
53     TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp
54     TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp
55     TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp
56     TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp
57     TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp
58     TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
59     TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp
60     TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp
61     TestNetscapePlugIn/Tests/PrivateBrowsing.cpp
62     TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp
63     TestNetscapePlugIn/Tests/URLRedirect.cpp
64 )
65
66 set(TestNetscapePlugIn_LIBRARIES
67     JavaScriptCore
68     WTF
69     WebCoreTestSupport
70 )
71
72 set(DumpRenderTree_IDL_FILES
73     "${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}/Bindings/UIScriptController.idl"
74 )
75
76 GENERATE_BINDINGS(DumpRenderTreeBindings
77     OUTPUT_SOURCE DumpRenderTree_SOURCES
78     INPUT_FILES ${DumpRenderTree_IDL_FILES}
79     BASE_DIR ${DUMP_RENDER_TREE_BINDINGS_DIR}
80     IDL_INCLUDES Bindings
81     FEATURES ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}
82     DESTINATION ${DERIVED_SOURCES_DIR}/DumpRenderTree
83     GENERATOR DumpRenderTree)
84
85 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
86
87 include_directories(${DumpRenderTree_INCLUDE_DIRECTORIES})
88
89 add_executable(DumpRenderTree ${DumpRenderTree_SOURCES})
90 target_link_libraries(DumpRenderTree ${DumpRenderTree_LIBRARIES})
91 add_dependencies(DumpRenderTree DumpRenderTreeBindings)
92
93 if (ENABLE_NETSCAPE_PLUGIN_API)
94     add_library(TestNetscapePlugIn SHARED ${TestNetscapePlugIn_SOURCES})
95     target_link_libraries(TestNetscapePlugIn ${TestNetscapePlugIn_LIBRARIES})
96 endif ()
97
98 if (WIN32)
99     add_dependencies(DumpRenderTree DumpRenderTreeLib)
100 endif ()