04c164177c5fc8f884b468f54a37627d61d3dbb3
[WebKit-https.git] / Source / WebKitLegacy / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12)
2 include(WebKitCommon)
3 set_property(DIRECTORY . PROPERTY FOLDER "WebKit")
4
5 set(WebKit_SOURCES
6     Storage/StorageAreaImpl.cpp
7     Storage/StorageAreaSync.cpp
8     Storage/StorageNamespaceImpl.cpp
9     Storage/StorageSyncManager.cpp
10     Storage/StorageThread.cpp
11     Storage/StorageTracker.cpp
12     Storage/WebDatabaseProvider.cpp
13     Storage/WebStorageNamespaceProvider.cpp
14
15     WebCoreSupport/WebResourceLoadScheduler.cpp
16     WebCoreSupport/WebViewGroup.cpp
17 )
18
19 set(WebKit_INCLUDE_DIRECTORIES
20     "${CMAKE_BINARY_DIR}"
21     "${WEBKIT_DIR}/Storage"
22     "${WEBKIT_DIR}/WebCoreSupport"
23     "${FORWARDING_HEADERS_DIR}/JavaScriptCore"
24     "${FORWARDING_HEADERS_DIR}/WebCore"
25     "${FORWARDING_HEADERS_DIR}/WebKitLegacy"
26 )
27
28 set(WebKit_SYSTEM_INCLUDE_DIRECTORIES
29     "${ICU_INCLUDE_DIRS}"
30 )
31
32 set(WebKit_LIBRARIES
33     PRIVATE JavaScriptCore${DEBUG_SUFFIX}
34     PRIVATE WebCore${DEBUG_SUFFIX}
35     PRIVATE PAL${DEBUG_SUFFIX}
36 )
37
38 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
39
40 if (MSVC)
41     ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
42     list(APPEND WebKit_SOURCES win/WebKit.resources/WebKit.rc)
43     add_definitions(/DWEBKIT_EXPORTS /DFRAMEWORK_NAME=WebKit)
44 endif ()
45
46 WEBKIT_FRAMEWORK(WebKit)
47
48 add_dependencies(WebKit WebCore)
49 if (TARGET WebKitGUID)
50     add_dependencies(WebKit WebKitGUID)
51 endif ()
52
53 if (APPLE)
54     set_target_properties(WebKit PROPERTIES LINK_FLAGS "-umbrella WebKit")
55 endif ()
56
57 if (MSVC)
58     add_custom_command(
59         TARGET WebKit
60         POST_BUILD
61         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_WEBKIT_DIR} $<TARGET_FILE:WebKit>
62         VERBATIM)
63 endif ()