Only define MAX_GRID_TRACK_REPETITIONS if CSS_GRID_LAYOUT is enabled.
[WebKit-https.git] / Source / WebKit / PlatformEfl.cmake
1 list(APPEND WebKit_INCLUDE_DIRECTORIES
2     "${WEBKIT_DIR}/efl/ewk"
3     "${WEBKIT_DIR}/efl/WebCoreSupport"
4     "${WEBCORE_DIR}/platform/efl"
5     "${WEBCORE_DIR}/platform/graphics/cairo"
6     "${WEBCORE_DIR}/platform/graphics/efl"
7     "${WEBCORE_DIR}/platform/graphics/freetype"
8     "${WEBCORE_DIR}/platform/graphics/opentype"
9     "${WEBCORE_DIR}/platform/mock"
10     "${WEBCORE_DIR}/platform/network/soup"
11     ${CAIRO_INCLUDE_DIRS}
12     ${ECORE_EVAS_INCLUDE_DIRS}
13     ${ECORE_INCLUDE_DIRS}
14     ${ECORE_INPUT_INCLUDE_DIRS}
15     ${ECORE_X_INCLUDE_DIRS}
16     ${EDJE_INCLUDE_DIRS}
17     ${EFREET_INCLUDE_DIRS}
18     ${EINA_INCLUDE_DIRS}
19     ${EO_INCLUDE_DIRS}
20     ${EVAS_INCLUDE_DIRS}
21     ${GLIB_INCLUDE_DIRS}
22     ${HARFBUZZ_INCLUDE_DIRS}
23     ${LIBSOUP_INCLUDE_DIRS}
24     ${LIBXML2_INCLUDE_DIR}
25     ${LIBXSLT_INCLUDE_DIR}
26     ${SQLITE_INCLUDE_DIR}
27 )
28
29 if (ENABLE_VIDEO)
30     list(APPEND WebKit_INCLUDE_DIRECTORIES
31         "${WEBCORE_DIR}/platform/graphics/gstreamer"
32         ${GSTREAMER_APP_INCLUDE_DIRS}
33         ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
34         ${GSTREAMER_VIDEO_INCLUDE_DIRS}
35     )
36 endif ()
37
38 if (ENABLE_VIDEO_TRACK)
39     list(APPEND WebKit_INCLUDE_DIRECTORIES
40         "${WEBCORE_DIR}/html/track"
41     )
42 endif ()
43
44 if (ENABLE_NOTIFICATIONS)
45     list(APPEND WebKit_INCLUDE_DIRECTORIES
46         "${WEBCORE_DIR}/Modules/notifications"
47     )
48 endif ()
49
50 if (ENABLE_VIBRATION)
51     list(APPEND WebKit_INCLUDE_DIRECTORIES
52         "${WEBCORE_DIR}/Modules/vibration"
53     )
54 endif ()
55
56 if (ENABLE_BATTERY_STATUS)
57     list(APPEND WebKit_INCLUDE_DIRECTORIES
58         "${WEBCORE_DIR}/Modules/battery"
59     )
60 endif ()
61
62 if (ENABLE_NAVIGATOR_CONTENT_UTILS)
63     list(APPEND WebKit_INCLUDE_DIRECTORIES
64         "${WEBCORE_DIR}/Modules/navigatorcontentutils"
65     )
66 endif ()
67
68 if (WTF_USE_3D_GRAPHICS)
69     list(APPEND WebKit_INCLUDE_DIRECTORIES
70         "${WEBCORE_DIR}/platform/graphics/surfaces"
71         "${WEBCORE_DIR}/platform/graphics/texmap"
72         "${THIRDPARTY_DIR}/ANGLE/include/KHR"
73         "${THIRDPARTY_DIR}/ANGLE/include/GLSLANG"
74     )
75 endif ()
76
77 if (ENABLE_GEOLOCATION)
78     list(APPEND WebKit_INCLUDE_DIRECTORIES
79         "${WEBCORE_DIR}/Modules/geolocation"
80     )
81 endif ()
82
83 if (ENABLE_ACCESSIBILITY)
84     list(APPEND WebKit_INCLUDE_DIRECTORIES
85         "${WEBCORE_DIR}/accessibility"
86         "${WEBCORE_DIR}/accessibility/atk"
87         ${ATK_INCLUDE_DIRS}
88     )
89     list(APPEND WebKit_LIBRARIES
90         ${ATK_LIBRARIES}
91     )
92 endif ()
93
94 list(APPEND WebKit_SOURCES
95     efl/WebCoreSupport/AcceleratedCompositingContextEfl.cpp
96     efl/WebCoreSupport/BatteryClientEfl.cpp
97     efl/WebCoreSupport/ChromeClientEfl.cpp
98     efl/WebCoreSupport/ColorChooserEfl.cpp
99     efl/WebCoreSupport/ContextMenuClientEfl.cpp
100     efl/WebCoreSupport/DeviceMotionClientEfl.cpp
101     efl/WebCoreSupport/DeviceOrientationClientEfl.cpp
102     efl/WebCoreSupport/DragClientEfl.cpp
103     efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
104     efl/WebCoreSupport/EditorClientEfl.cpp
105     efl/WebCoreSupport/FrameLoaderClientEfl.cpp
106     efl/WebCoreSupport/FrameNetworkingContextEfl.cpp
107     efl/WebCoreSupport/IconDatabaseClientEfl.cpp
108     efl/WebCoreSupport/InspectorClientEfl.cpp
109     efl/WebCoreSupport/NavigatorContentUtilsClientEfl.cpp
110     efl/WebCoreSupport/NotificationPresenterClientEfl.cpp
111     efl/WebCoreSupport/PlatformStrategiesEfl.cpp
112     efl/WebCoreSupport/ProgressTrackerClientEfl.cpp
113     efl/WebCoreSupport/PopupMenuEfl.cpp
114     efl/WebCoreSupport/SearchPopupMenuEfl.cpp
115     efl/WebCoreSupport/StorageTrackerClientEfl.cpp
116     efl/WebCoreSupport/VibrationClientEfl.cpp
117
118     efl/ewk/ewk_auth.cpp
119     efl/ewk/ewk_auth_soup.cpp
120     efl/ewk/ewk_contextmenu.cpp
121     efl/ewk/ewk_cookies.cpp
122     efl/ewk/ewk_custom_handler.cpp
123     efl/ewk/ewk_file_chooser.cpp
124     efl/ewk/ewk_frame.cpp
125     efl/ewk/ewk_history.cpp
126     efl/ewk/ewk_js.cpp
127     efl/ewk/ewk_main.cpp
128     efl/ewk/ewk_network.cpp
129     efl/ewk/ewk_security_origin.cpp
130     efl/ewk/ewk_security_policy.cpp
131     efl/ewk/ewk_settings.cpp
132     efl/ewk/ewk_touch_event.cpp
133     efl/ewk/ewk_view.cpp
134     efl/ewk/ewk_web_database.cpp
135     efl/ewk/ewk_window_features.cpp
136 )
137
138 list(APPEND WebKit_LIBRARIES
139     ${CAIRO_LIBRARIES}
140     ${CMAKE_DL_LIBS}
141     ${ECORE_EVAS_LIBRARIES}
142     ${ECORE_INPUT_LIBRARIES}
143     ${ECORE_LIBRARIES}
144     ${EDJE_LIBRARIES}
145     ${EFREET_LIBRARIES}
146     ${EINA_LIBRARIES}
147     ${EO_LIBRARIES}
148     ${EVAS_LIBRARIES}
149     ${FONTCONFIG_LIBRARIES}
150     ${FREETYPE2_LIBRARIES}
151     ${GLIB_GOBJECT_LIBRARIES}
152     ${GLIB_LIBRARIES}
153     ${HARFBUZZ_LIBRARIES}
154     ${JPEG_LIBRARIES}
155     ${LIBSOUP_LIBRARIES}
156     ${LIBXML2_LIBRARIES}
157     ${PNG_LIBRARIES}
158     ${SQLITE_LIBRARIES}
159 )
160
161 if (ENABLE_ECORE_X)
162     list(APPEND WebKit_LIBRARIES
163         ${ECORE_X_LIBRARIES}
164     )
165 endif ()
166
167 if (SHARED_CORE)
168     set(LIBS_PRIVATE "-l${WTF_OUTPUT_NAME} -l${JavaScriptCore_OUTPUT_NAME} -l${WebCore_OUTPUT_NAME}")
169 else ()
170     set(LIBS_PRIVATE "")
171 endif ()
172
173 configure_file(efl/ewebkit.pc.in ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc @ONLY)
174 configure_file(efl/EWebKitConfig.cmake.in ${CMAKE_BINARY_DIR}/WebKit/efl/EWebKitConfig.cmake @ONLY)
175 configure_file(efl/EWebKitConfigVersion.cmake.in ${CMAKE_BINARY_DIR}/WebKit/efl/EWebKitConfigVersion.cmake @ONLY)
176 install(FILES ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc DESTINATION lib/pkgconfig)
177 install(FILES
178         ${CMAKE_BINARY_DIR}/WebKit/efl/EWebKitConfig.cmake
179         ${CMAKE_BINARY_DIR}/WebKit/efl/EWebKitConfigVersion.cmake
180         DESTINATION lib/cmake/EWebKit)
181
182 unset(LIBS_PRIVATE)
183
184 set(EWebKit_HEADERS
185     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/EWebKit.h
186     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_auth.h
187     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_contextmenu.h
188     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_cookies.h
189     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_file_chooser.h
190     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_frame.h
191     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_history.h
192     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_js.h
193     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_main.h
194     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_network.h
195     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_security_origin.h
196     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_security_policy.h
197     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_settings.h
198     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_view.h
199     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_web_database.h
200     ${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_window_features.h
201 )
202
203 install(FILES ${EWebKit_HEADERS}
204         DESTINATION include/${WebKit_OUTPUT_NAME}-${PROJECT_VERSION_MAJOR})
205
206 include_directories(${THIRDPARTY_DIR}/gtest/include)
207
208 set(EWKUnitTests_LIBRARIES
209     ${ECORE_EVAS_LIBRARIES}
210     ${ECORE_LIBRARIES}
211     ${EDJE_LIBRARIES}
212     ${EVAS_LIBRARIES}
213     JavaScriptCore
214     WTF
215     WebCore
216     WebKit
217     gtest
218 )
219
220 set(EWKUnitTests_INCLUDE_DIRECTORIES
221     "${CMAKE_SOURCE_DIR}/Source"
222     "${WEBKIT_DIR}/efl/ewk"
223     "${JAVASCRIPTCORE_DIR}"
224     "${WTF_DIR}"
225     "${WTF_DIR}/wtf"
226     ${ECORE_INCLUDE_DIRS}
227     ${ECORE_EVAS_INCLUDE_DIRS}
228     ${EVAS_INCLUDE_DIRS}
229     ${EDJE_INCLUDE_DIRS}
230 )
231
232 list(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
233 list(APPEND EWKUnitTests_LIBRARIES
234     ${GLIB_GTHREAD_LIBRARIES}
235     ${GLIB_LIBRARIES}
236 )
237
238 set(DEFAULT_TEST_PAGE_DIR ${CMAKE_SOURCE_DIR}/Source/WebKit/efl/tests/resources)
239
240 add_definitions(-DDEFAULT_TEST_PAGE_DIR=\"${DEFAULT_TEST_PAGE_DIR}\"
241     -DDEFAULT_THEME_PATH=\"${THEME_BINARY_DIR}\"
242     -DGTEST_LINKED_AS_SHARED_LIBRARY=1
243 )
244
245 add_library(ewkTestUtils
246     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestBase.cpp
247     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestEnvironment.cpp
248     ${WEBKIT_DIR}/efl/tests/UnitTestUtils/EWKTestView.cpp
249 )
250 target_link_libraries(ewkTestUtils ${EWKUnitTests_LIBRARIES})
251
252 set(WEBKIT_EFL_TEST_DIR "${WEBKIT_DIR}/efl/tests/")
253 set(WEBKIT_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/TestWebKitAPI/EWebKit)
254
255 set(EWKUnitTests_BINARIES
256     test_ewk_contextmenu
257     test_ewk_frame
258     test_ewk_setting
259     test_ewk_view
260 )
261
262 if (ENABLE_API_TESTS)
263     foreach (testName ${EWKUnitTests_BINARIES})
264         add_executable(${testName} ${WEBKIT_EFL_TEST_DIR}/${testName}.cpp ${WEBKIT_EFL_TEST_DIR}/test_runner.cpp)
265         add_test(${testName} ${WEBKIT_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY}/${testName})
266         set_tests_properties(${testName} PROPERTIES TIMEOUT 60)
267         set_target_properties(${testName} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${WEBKIT_EFL_TEST_RUNTIME_OUTPUT_DIRECTORY})
268         target_link_libraries(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
269     endforeach ()
270 endif ()
271