07b647b80c2488b12942710ab588fc3f20e234db
[WebKit-https.git] / Tools / WebKitTestRunner / CMakeLists.txt
1 set(WEBKIT_TESTRUNNER_DIR "${TOOLS_DIR}/WebKitTestRunner")
2 set(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
3
4 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
5
6 set(WebKitTestRunner_SOURCES
7     ${WEBKIT_TESTRUNNER_DIR}/CyclicRedundancyCheck.cpp
8     ${WEBKIT_TESTRUNNER_DIR}/GeolocationProviderMock.cpp
9     ${WEBKIT_TESTRUNNER_DIR}/PixelDumpSupport.cpp
10     ${WEBKIT_TESTRUNNER_DIR}/TestController.cpp
11     ${WEBKIT_TESTRUNNER_DIR}/TestInvocation.cpp
12     ${WEBKIT_TESTRUNNER_DIR}/WebNotificationProvider.cpp
13     ${WEBKIT_TESTRUNNER_DIR}/WorkQueueManager.cpp
14 )
15
16 set(WebKitTestRunner_LIBRARIES
17     JavaScriptCore
18     WebCore
19     WebCoreTestSupport
20     WebKit2
21 )
22
23 set(WebKitTestRunner_INCLUDE_DIRECTORIES
24     ${WEBKIT_TESTRUNNER_DIR}
25     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle
26     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
27     ${JAVASCRIPTCORE_DIR}
28     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
29     ${WEBCORE_DIR}/editing
30     ${WEBCORE_DIR}/platform
31     ${WEBCORE_DIR}/platform/graphics
32     ${WEBCORE_DIR}/platform/graphics/harfbuzz
33     ${WEBCORE_DIR}/platform/graphics/harfbuzz/ng
34     ${WEBCORE_DIR}/platform/network
35     ${WEBCORE_DIR}/platform/text
36     ${WEBCORE_DIR}/testing/js
37     ${WEBKIT2_DIR}/Shared
38     ${WEBKIT2_DIR}/Shared/API/c
39     ${WEBKIT2_DIR}/Shared/Plugins
40     ${WEBKIT2_DIR}/UIProcess
41     ${WEBKIT2_DIR}/UIProcess/API/C/efl
42     ${WEBKIT2_DIR}/UIProcess/API/C/soup
43     ${WEBKIT2_DIR}/WebProcess/InjectedBundle
44     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c
45     ${WTF_DIR}
46     ${DERIVED_SOURCES_WEBCORE_DIR}
47     ${DERIVED_SOURCES_WEBCORE_DIR}/include
48     ${DERIVED_SOURCES_WEBKIT2_DIR}/include
49     ${DERIVED_SOURCES_DIR}/InjectedBundle
50     ${CMAKE_BINARY_DIR}
51     ${CMAKE_SOURCE_DIR}/Source
52     ${LIBSOUP_INCLUDE_DIRS}
53 )
54
55 set(WebKitTestRunnerInjectedBundle_SOURCES
56     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityController.cpp
57     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarker.cpp
58     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarkerRange.cpp
59     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityUIElement.cpp
60     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/EventSendingController.cpp
61     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/GCController.cpp
62     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundle.cpp
63     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundleMain.cpp
64     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/InjectedBundlePage.cpp
65     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TestRunner.cpp
66     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/TextInputController.cpp
67
68     ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/JSWrapper.cpp
69 )
70
71 set(WebKitTestRunnerInjectedBundle_IDL_FILES
72     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityController.idl"
73     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarker.idl"
74     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarkerRange.idl"
75     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityUIElement.idl"
76     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/EventSendingController.idl"
77     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/GCController.idl"
78     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TestRunner.idl"
79     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TextInputController.idl"
80 )
81
82 set(WebKitTestRunnerInjectedBundle_LIBRARIES
83     ${WebKitTestRunner_LIBRARIES}
84     ${ATK_LIBRARIES}
85     ${ECORE_LIBRARIES}
86     ${ECORE_FILE_LIBRARIES}
87     ${FONTCONFIG_LIBRARIES}
88     ${GLIB_LIBRARIES}
89     ${GLIB_GOBJECT_LIBRARIES}
90 )
91
92 GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
93     "${WebKitTestRunnerInjectedBundle_IDL_FILES}"
94     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
95     "--include=${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
96     "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
97     ${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner
98     ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
99
100 INCLUDE_IF_EXISTS(${WEBKIT_TESTRUNNER_DIR}/Platform${PORT}.cmake)
101
102 include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
103
104 add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
105 target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunnerInjectedBundle_LIBRARIES})
106
107 add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
108 target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
109
110 add_dependencies(WebKit2 ${ForwardingHeadersForWebKitTestRunner_NAME})
111 add_dependencies(WebKit2 ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})