[WPE] Support 2D axis, smooth-motion events
[WebKit-https.git] / Tools / TestWebKitAPI / PlatformGTK.cmake
1 set(TESTWEBKITAPI_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI")
2
3 add_custom_target(TestWebKitAPI-forwarding-headers
4     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/Scripts/generate-forwarding-headers.pl --include-path ${TESTWEBKITAPI_DIR} --output ${FORWARDING_HEADERS_DIR} --platform gtk --platform soup
5     DEPENDS WebKit-forwarding-headers
6 )
7
8 list(APPEND TestWebKit_DEPENDENCIES TestWebKitAPI-forwarding-headers)
9 add_dependencies(TestWebKitAPIInjectedBundle TestWebKitAPI-forwarding-headers)
10
11 set(test_main_SOURCES gtk/main.cpp)
12
13 # TestWTF
14 list(APPEND TestWTF_SOURCES
15     ${test_main_SOURCES}
16
17     Tests/WTF/glib/GUniquePtr.cpp
18     Tests/WTF/glib/WorkQueueGLib.cpp
19
20     glib/UtilitiesGLib.cpp
21 )
22
23 list(APPEND TestWTF_SYSTEM_INCLUDE_DIRECTORIES
24     ${GLIB_INCLUDE_DIRS}
25     ${GTK3_INCLUDE_DIRS}
26 )
27
28 list(APPEND TestWTF_LIBRARIES
29     ${GDK3_LIBRARIES}
30     ${GTK3_LIBRARIES}
31 )
32
33 # TestWebCore
34 list(APPEND TestWebCore_SOURCES
35     ${test_main_SOURCES}
36
37     Tests/WebCore/gstreamer/GStreamerTest.cpp
38     Tests/WebCore/gstreamer/GstMappedBuffer.cpp
39
40     glib/UtilitiesGLib.cpp
41 )
42
43 list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES
44     ${GLIB_INCLUDE_DIRS}
45     ${GTK3_INCLUDE_DIRS}
46 )
47
48 list(APPEND TestWebCore_LIBRARIES
49     ${GDK3_LIBRARIES}
50     ${GTK3_LIBRARIES}
51 )
52 ADD_WHOLE_ARCHIVE_TO_LIBRARIES(TestWebCore_LIBRARIES)
53
54 # TestWebKit
55 list(APPEND TestWebKit_SOURCES
56     ${test_main_SOURCES}
57
58     glib/UtilitiesGLib.cpp
59
60     gtk/PlatformUtilitiesGtk.cpp
61     gtk/PlatformWebViewGtk.cpp
62 )
63
64 list(APPEND TestWebKit_PRIVATE_INCLUDE_DIRECTORIES
65     "${CMAKE_SOURCE_DIR}/Source"
66 )
67
68 list(APPEND TestWebKit_SYSTEM_INCLUDE_DIRECTORIES
69     ${GLIB_INCLUDE_DIRS}
70     ${GTK3_INCLUDE_DIRS}
71 )
72
73 list(APPEND TestWebKit_LIBRARIES
74     ${GDK3_LIBRARIES}
75     ${GTK3_LIBRARIES}
76 )
77
78 # TestWebKitAPIBase
79 target_include_directories(TestWebKitAPIBase PRIVATE "${CMAKE_SOURCE_DIR}/Source")
80
81 # TestWebKitAPIInjectedBundle
82 target_sources(TestWebKitAPIInjectedBundle PRIVATE
83     glib/UtilitiesGLib.cpp
84
85     gtk/PlatformUtilitiesGtk.cpp
86 )
87 target_include_directories(TestWebKitAPIInjectedBundle PRIVATE
88     "${CMAKE_SOURCE_DIR}/Source"
89 )
90 target_include_directories(TestWebKitAPIInjectedBundle SYSTEM PRIVATE
91     ${GLIB_INCLUDE_DIRS}
92     ${GTK3_INCLUDE_DIRS}
93 )
94
95 # TestJSC
96 set(TestJSC_SOURCES
97     Tests/JavaScriptCore/glib/TestJSC.cpp
98 )
99
100 set(TestJSC_SYSTEM_INCLUDE_DIRECTORIES
101     ${GLIB_INCLUDE_DIRS}
102     ${GTK3_INCLUDE_DIRS}
103 )
104
105 set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
106     ${CMAKE_BINARY_DIR}
107     ${TESTWEBKITAPI_DIR}
108     ${THIRDPARTY_DIR}/gtest/include
109     ${FORWARDING_HEADERS_DIR}
110     ${FORWARDING_HEADERS_DIR}/JavaScriptCore
111     ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
112     ${DERIVED_SOURCES_JAVASCRIPCOREGTK_DIR}
113 )
114
115 set(TestJSC_LIBRARIES
116     ${GLIB_LIBRARIES}
117     ${GLIB_GMODULE_LIBRARIES}
118     WebKit::JavaScriptCore
119 )
120
121 set(TestJSC_DEFINITIONS
122     WEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}"
123 )
124
125 WEBKIT_EXECUTABLE_DECLARE(TestJSC)
126 WEBKIT_TEST(TestJSC)