[CMake] Use builtin FindICU
[WebKit-https.git] / Source / WebKitLegacy / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12)
2 include(WebKitCommon)
3 set_property(DIRECTORY . PROPERTY FOLDER "WebKitLegacy")
4
5 set(WebKitLegacy_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/NetworkStorageSessionMap.cpp
16     WebCoreSupport/WebResourceLoadScheduler.cpp
17     WebCoreSupport/WebViewGroup.cpp
18 )
19
20 set(WebKitLegacy_PRIVATE_INCLUDE_DIRECTORIES
21     "${CMAKE_BINARY_DIR}"
22     "${WEBKITLEGACY_DIR}/Storage"
23     "${WEBKITLEGACY_DIR}/WebCoreSupport"
24     "${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
25     "${WebKitLegacy_DERIVED_SOURCES_DIR}"
26 )
27
28 set(WebKitLegacy_LIBRARIES
29     PRIVATE JavaScriptCore${DEBUG_SUFFIX}
30     PRIVATE WebCore${DEBUG_SUFFIX}
31     PRIVATE PAL${DEBUG_SUFFIX}
32 )
33
34 WEBKIT_FRAMEWORK_DECLARE(WebKitLegacy)
35 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
36
37 if (MSVC)
38     WEBKIT_ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKitLegacy_SOURCES)
39     list(APPEND WebKitLegacy_SOURCES win/WebKit.resources/WebKit.rc)
40     add_definitions(/DWEBKIT_EXPORTS /DFRAMEWORK_NAME=WebKitLegacy)
41 endif ()
42
43 WEBKIT_FRAMEWORK(WebKitLegacy)
44
45 add_dependencies(WebKitLegacy WebCore WebCorePrivateFrameworkHeaders)
46 if (TARGET WebKitLegacyGUID)
47     add_dependencies(WebKitLegacy WebKitLegacyGUID)
48 endif ()
49
50 if (APPLE)
51     set_target_properties(WebKitLegacy PROPERTIES LINK_FLAGS "-umbrella WebKit")
52 endif ()
53
54 if (MSVC)
55     add_custom_command(
56         TARGET WebKitLegacy
57         POST_BUILD
58         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${WebKitLegacy_DERIVED_SOURCES_DIR} $<TARGET_FILE:WebKitLegacy>
59         VERBATIM)
60
61      if (NOT WTF_PLATFORM_WIN_CAIRO)
62          add_subdirectory(win/WebKitQuartzCoreAdditions)
63      endif ()
64 endif ()