Progress towards CMake on Mac.
[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}/Options.cpp
10     ${WEBKIT_TESTRUNNER_DIR}/PixelDumpSupport.cpp
11     ${WEBKIT_TESTRUNNER_DIR}/TestController.cpp
12     ${WEBKIT_TESTRUNNER_DIR}/TestInvocation.cpp
13     ${WEBKIT_TESTRUNNER_DIR}/WebNotificationProvider.cpp
14     ${WEBKIT_TESTRUNNER_DIR}/WorkQueueManager.cpp
15 )
16
17 set(WebKitTestRunner_LIBRARIES
18     JavaScriptCore
19     WebCore
20     WebCoreTestSupport
21     WebKit2
22 )
23
24 set(WebKitTestRunner_INCLUDE_DIRECTORIES
25     ${WEBKIT_TESTRUNNER_DIR}
26     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle
27     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
28     ${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/atk
29     ${JAVASCRIPTCORE_DIR}
30     ${JAVASCRIPTCORE_DIR}/ForwardingHeaders
31     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
32     ${WEBCORE_DIR}/editing
33     ${WEBCORE_DIR}/platform
34     ${WEBCORE_DIR}/platform/graphics
35     ${WEBCORE_DIR}/platform/graphics/harfbuzz
36     ${WEBCORE_DIR}/platform/graphics/harfbuzz/ng
37     ${WEBCORE_DIR}/platform/network
38     ${WEBCORE_DIR}/platform/text
39     ${WEBCORE_DIR}/testing/js
40     ${WEBKIT2_DIR}/Platform/IPC
41     ${WEBKIT2_DIR}/Shared
42     ${WEBKIT2_DIR}/Shared/API/c
43     ${WEBKIT2_DIR}/Shared/Plugins
44     ${WEBKIT2_DIR}/UIProcess
45     ${WEBKIT2_DIR}/UIProcess/API/C/soup
46     ${WEBKIT2_DIR}/WebProcess/InjectedBundle
47     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c
48     ${WTF_DIR}
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 )
85
86 GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
87     "${WebKitTestRunnerInjectedBundle_IDL_FILES}"
88     "${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
89     "--include=${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
90     "${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
91     ${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner cpp
92     ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
93
94 INCLUDE_IF_EXISTS(${WEBKIT_TESTRUNNER_DIR}/Platform${PORT}.cmake)
95
96 include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
97
98 add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
99 target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunnerInjectedBundle_LIBRARIES})
100
101 add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
102 target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
103
104 add_dependencies(WebKit2 ${ForwardingHeadersForWebKitTestRunner_NAME})