[GTK][WPE][CMake] failing to build TestWebKitAPIInjectedBundle due to missing forward...
[WebKit-https.git] / Tools / TestWebKitAPI / PlatformWPE.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 wpe --platform soup
5     DEPENDS webkitwpe-forwarding-headers
6 )
7
8 list(APPEND TestWebKit_DEPENDENCIES TestWebKitAPI-forwarding-headers)
9 add_dependencies(TestWebKitAPIInjectedBundle TestWebKitAPI-forwarding-headers)
10
11 include_directories(SYSTEM
12     ${CAIRO_INCLUDE_DIRS}
13     ${GLIB_INCLUDE_DIRS}
14     ${GSTREAMER_INCLUDE_DIRS}
15     ${GSTREAMER_AUDIO_INCLUDE_DIRS}
16     ${LIBSOUP_INCLUDE_DIRS}
17     ${WPE_INCLUDE_DIRS}
18     ${WPEBACKEND_FDO_INCLUDE_DIRS}
19 )
20
21 set(test_main_SOURCES generic/main.cpp)
22
23 # TestWTF
24 list(APPEND TestWTF_SOURCES
25     ${test_main_SOURCES}
26
27     Tests/WTF/glib/GUniquePtr.cpp
28     Tests/WTF/glib/WorkQueueGLib.cpp
29
30     glib/UtilitiesGLib.cpp
31 )
32
33 list(APPEND TestWTF_SYSTEM_INCLUDE_DIRECTORIES
34     ${GLIB_INCLUDE_DIRS}
35 )
36
37 # TestWebCore
38 list(APPEND TestWebCore_SOURCES
39     ${test_main_SOURCES}
40
41     Tests/WebCore/gstreamer/GStreamerTest.cpp
42     Tests/WebCore/gstreamer/GstMappedBuffer.cpp
43
44     glib/UtilitiesGLib.cpp
45 )
46
47 list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES
48     ${GLIB_INCLUDE_DIRS}
49 )
50
51 # TestWebKit
52 list(APPEND TestWebKit_SOURCES
53     ${test_main_SOURCES}
54
55     glib/UtilitiesGLib.cpp
56
57     wpe/PlatformUtilitiesWPE.cpp
58     wpe/PlatformWebViewWPE.cpp
59 )
60
61 list(APPEND TestWebKit_PRIVATE_INCLUDE_DIRECTORIES
62     ${CMAKE_SOURCE_DIR}/Source
63     ${FORWARDING_HEADERS_DIR}
64     ${WPEBACKEND_FDO_INCLUDE_DIRS}
65     ${TOOLS_DIR}/wpe/backends
66 )
67
68 list(APPEND TestWebKit_SYSTEM_INCLUDE_DIRECTORIES
69     ${GLIB_INCLUDE_DIRS}
70 )
71
72 list(APPEND TestWebKit_LIBRARIES
73     ${WPEBACKEND_FDO_LIBRARIES}
74     WPEToolingBackends
75 )
76
77 # TestWebKitAPIBase
78 target_include_directories(TestWebKitAPIBase PRIVATE
79     ${CMAKE_SOURCE_DIR}/Source
80     ${FORWARDING_HEADERS_DIR}
81 )
82
83 # TestWebKitAPIInjectedBundle
84 target_sources(TestWebKitAPIInjectedBundle PRIVATE
85     glib/UtilitiesGLib.cpp
86
87     wpe/InjectedBundleControllerWPE.cpp
88     wpe/PlatformUtilitiesWPE.cpp
89 )
90 target_include_directories(TestWebKitAPIInjectedBundle PRIVATE
91     ${CMAKE_SOURCE_DIR}/Source
92     ${FORWARDING_HEADERS_DIR}
93 )
94
95 # TestJSC
96 set(TestJSC_SOURCES
97     Tests/JavaScriptCore/glib/TestJSC.cpp
98 )
99
100 set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES
101     ${CMAKE_BINARY_DIR}
102     ${TESTWEBKITAPI_DIR}
103     ${THIRDPARTY_DIR}/gtest/include
104     ${FORWARDING_HEADERS_DIR}
105     ${FORWARDING_HEADERS_DIR}/JavaScriptCore
106     ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib
107     ${DERIVED_SOURCES_JAVASCRIPCOREWPE_DIR}
108 )
109
110 set(TestJSC_LIBRARIES
111     ${GLIB_LIBRARIES}
112     ${GLIB_GMODULE_LIBRARIES}
113     WebKit::JavaScriptCore
114 )
115
116 set(TestJSC_DEFINITIONS
117     WEBKIT_SRC_DIR="${CMAKE_SOURCE_DIR}"
118 )
119
120 WEBKIT_EXECUTABLE_DECLARE(TestJSC)
121 WEBKIT_TEST(TestJSC)