1set(WebKit_INCLUDE_DIRECTORIES
2    "${CMAKE_SOURCE_DIR}/Source"
3    "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
4    "${WEBKIT_DIR}"
5    "${WEBCORE_DIR}"
6    "${WEBCORE_DIR}/ForwardingHeaders"
7    "${WEBCORE_DIR}/Modules/geolocation"
8    "${WEBCORE_DIR}/Modules/filesystem"
9    "${WEBCORE_DIR}/Modules/mediastream"
10    "${WEBCORE_DIR}/Modules/navigatorcontentutils"
11    "${WEBCORE_DIR}/Modules/networkinfo"
12    "${WEBCORE_DIR}/Modules/webdatabase"
13    "${WEBCORE_DIR}/Modules/websockets"
14    "${WEBCORE_DIR}/accessibility"
15    "${WEBCORE_DIR}/bindings/generic"
16    "${WEBCORE_DIR}/bindings/js"
17    "${WEBCORE_DIR}/bindings"
18    "${WEBCORE_DIR}/bridge"
19    "${WEBCORE_DIR}/bridge/c"
20    "${WEBCORE_DIR}/bridge/jsc"
21    "${WEBCORE_DIR}/css"
22    "${WEBCORE_DIR}/dom"
23    "${WEBCORE_DIR}/dom/default"
24    "${WEBCORE_DIR}/editing"
25    "${WEBCORE_DIR}/fileapi"
26    "${WEBCORE_DIR}/history"
27    "${WEBCORE_DIR}/html"
28    "${WEBCORE_DIR}/html/forms"
29    "${WEBCORE_DIR}/html/shadow"
30    "${WEBCORE_DIR}/inspector"
31    "${WEBCORE_DIR}/loader"
32    "${WEBCORE_DIR}/loader/archive"
33    "${WEBCORE_DIR}/loader/appcache"
34    "${WEBCORE_DIR}/loader/icon"
35    "${WEBCORE_DIR}/loader/cache"
36    "${WEBCORE_DIR}/page"
37    "${WEBCORE_DIR}/page/animation"
38    "${WEBCORE_DIR}/page/scrolling"
39    "${WEBCORE_DIR}/platform"
40    "${WEBCORE_DIR}/platform/animation"
41    "${WEBCORE_DIR}/platform/audio"
42    "${WEBCORE_DIR}/platform/graphics"
43    "${WEBCORE_DIR}/platform/graphics/filters"
44    "${WEBCORE_DIR}/platform/graphics/harfbuzz"
45    "${WEBCORE_DIR}/platform/graphics/harfbuzz/ng"
46    "${WEBCORE_DIR}/platform/graphics/opengl"
47    "${WEBCORE_DIR}/platform/graphics/transforms"
48    "${WEBCORE_DIR}/platform/mediastream"
49    "${WEBCORE_DIR}/platform/mock"
50    "${WEBCORE_DIR}/platform/network"
51    "${WEBCORE_DIR}/platform/sql"
52    "${WEBCORE_DIR}/platform/text"
53    "${WEBCORE_DIR}/plugins"
54    "${WEBCORE_DIR}/rendering"
55    "${WEBCORE_DIR}/rendering/line"
56    "${WEBCORE_DIR}/rendering/shapes"
57    "${WEBCORE_DIR}/rendering/style"
58    "${WEBCORE_DIR}/storage"
59    "${WEBCORE_DIR}/style"
60    "${WEBCORE_DIR}/svg"
61    "${WEBCORE_DIR}/svg/animation"
62    "${WEBCORE_DIR}/svg/graphics"
63    "${WEBCORE_DIR}/svg/properties"
64    "${WEBCORE_DIR}/workers"
65    "${JAVASCRIPTCORE_DIR}"
66    "${JAVASCRIPTCORE_DIR}/API"
67    "${JAVASCRIPTCORE_DIR}/assembler"
68    "${JAVASCRIPTCORE_DIR}/bytecode"
69    "${JAVASCRIPTCORE_DIR}/bytecompiler"
70    "${JAVASCRIPTCORE_DIR}/disassembler"
71    "${JAVASCRIPTCORE_DIR}/dfg"
72    "${JAVASCRIPTCORE_DIR}/heap"
73    "${JAVASCRIPTCORE_DIR}/debugger"
74    "${JAVASCRIPTCORE_DIR}/interpreter"
75    "${JAVASCRIPTCORE_DIR}/jit"
76    "${JAVASCRIPTCORE_DIR}/llint"
77    "${JAVASCRIPTCORE_DIR}/parser"
78    "${JAVASCRIPTCORE_DIR}/profiler"
79    "${JAVASCRIPTCORE_DIR}/runtime"
80    "${WTF_DIR}"
81    "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
82    "${DERIVED_SOURCES_WEBCORE_DIR}"
83    "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
84    "${CMAKE_BINARY_DIR}"
85)
86
87if (WTF_USE_SOUP)
88  list(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/soup")
89endif ()
90
91if (WTF_USE_CURL)
92  list(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/curl")
93endif ()
94
95set(WebKit_LIBRARIES
96    JavaScriptCore
97    WTF
98    WebCore
99)
100
101WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
102
103include_directories(${WebKit_INCLUDE_DIRECTORIES})
104add_library(WebKit ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
105add_dependencies(WebKit WebCore)
106target_link_libraries(WebKit ${WebKit_LIBRARIES})
107set_target_properties(WebKit PROPERTIES COMPILE_DEFINITIONS "BUILDING_WebKit;BUILDING_WEBKIT")
108set_target_properties(WebKit PROPERTIES FOLDER "WebKit")
109set_target_properties(WebKit PROPERTIES LINK_INTERFACE_LIBRARIES "")
110
111if (WebKit_LINK_FLAGS)
112    ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "${WebKit_LINK_FLAGS}")
113endif ()
114
115if (VERSION_SCRIPT)
116    ADD_TARGET_PROPERTIES(WebKit LINK_FLAGS "${VERSION_SCRIPT}")
117endif ()
118
119if (WebKit_OUTPUT_NAME)
120    set_target_properties(WebKit PROPERTIES OUTPUT_NAME ${WebKit_OUTPUT_NAME})
121endif ()
122
123POPULATE_LIBRARY_VERSION(WEBKIT)
124set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
125install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")
126