PlatformEfl.cmake 8.0 KB

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