Fix Windows tests after r189934.
[WebKit-https.git] / Source / WebKit / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12)
2 include(WebKitCommon)
3
4 set(WebKit_SOURCES
5     WebCoreSupport/WebViewGroup.cpp
6 )
7
8 set(WebKit_INCLUDE_DIRECTORIES
9     WebCoreSupport
10     "${CMAKE_BINARY_DIR}"
11     "${CMAKE_SOURCE_DIR}/Source"
12     "${DERIVED_SOURCES_DIR}"
13     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
14     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
15     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore"
16     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy"
17 )
18
19 set(WebKit_SYSTEM_INCLUDE_DIRECTORIES "")
20
21 set(WebKit_LIBRARIES
22     PRIVATE JavaScriptCore${DEBUG_SUFFIX}
23     PRIVATE WTF${DEBUG_SUFFIX}
24     PRIVATE WebCore${DEBUG_SUFFIX}
25 )
26
27 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
28
29 include_directories(${WebKit_INCLUDE_DIRECTORIES})
30 include_directories(SYSTEM ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
31
32 if (MSVC)
33     ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
34     list(APPEND WebKit_SOURCES win/WebKit.resources/WebKit.rc)
35 endif ()
36
37 add_library(WebKit ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
38 add_dependencies(WebKit WebCore)
39 target_link_libraries(WebKit ${WebKit_LIBRARIES})
40 set_target_properties(WebKit PROPERTIES FOLDER "WebKit")
41
42 if (WebKit_OUTPUT_NAME)
43     set_target_properties(WebKit PROPERTIES OUTPUT_NAME ${WebKit_OUTPUT_NAME})
44 endif ()
45
46 POPULATE_LIBRARY_VERSION(WEBKIT)
47 set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
48 install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")