2010-08-27 Kimmo Kinnunen <kimmo.t.kinnunen@nokia.com>
[WebKit-https.git] / WebKit / CMakeLists.txt
1 SET(WebKit_INCLUDE_DIRECTORIES
2     "${WEBKIT_DIR}"
3     "${WEBCORE_DIR}"
4     "${WEBCORE_DIR}/bindings/js"
5     "${WEBCORE_DIR}/bindings"
6     "${WEBCORE_DIR}/bridge"
7     "${WEBCORE_DIR}/bridge/jsc"
8     "${WEBCORE_DIR}/css"
9     "${WEBCORE_DIR}/dom"
10     "${WEBCORE_DIR}/editing"
11     "${WEBCORE_DIR}/history"
12     "${WEBCORE_DIR}/html"
13     "${WEBCORE_DIR}/inspector"
14     "${WEBCORE_DIR}/loader"
15     "${WEBCORE_DIR}/loader/icon"
16     "${WEBCORE_DIR}/page"
17     "${WEBCORE_DIR}/page/animation"
18     "${WEBCORE_DIR}/platform"
19     "${WEBCORE_DIR}/platform/animation"
20     "${WEBCORE_DIR}/platform/graphics"
21     "${WEBCORE_DIR}/platform/graphics/cairo"
22     "${WEBCORE_DIR}/platform/graphics/transforms"
23     "${WEBCORE_DIR}/platform/network"
24     "${WEBCORE_DIR}/platform/sql"
25     "${WEBCORE_DIR}/platform/text"
26     "${WEBCORE_DIR}/plugins"
27     "${WEBCORE_DIR}/rendering"
28     "${WEBCORE_DIR}/rendering/style"
29     "${WEBCORE_DIR}/storage"
30     "${WEBCORE_DIR}/svg"
31     "${JAVASCRIPTCORE_DIR}"
32     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
33     "${JAVASCRIPTCORE_DIR}/API"
34     "${JAVASCRIPTCORE_DIR}/assembler"
35     "${JAVASCRIPTCORE_DIR}/bytecode"
36     "${JAVASCRIPTCORE_DIR}/bytecompiler"
37     "${JAVASCRIPTCORE_DIR}/debugger"
38     "${JAVASCRIPTCORE_DIR}/interpreter"
39     "${JAVASCRIPTCORE_DIR}/jit"
40     "${JAVASCRIPTCORE_DIR}/parser"
41     "${JAVASCRIPTCORE_DIR}/profiler"
42     "${JAVASCRIPTCORE_DIR}/runtime"
43     "${JAVASCRIPTCORE_DIR}/wtf"
44     "${JAVASCRIPTCORE_DIR}/wtf/unicode"
45     "${DERIVED_SOURCES_DIR}"
46     "${CMAKE_BINARY_DIR}"
47 )
48
49 IF (WTF_USE_SOUP)
50   LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/soup")
51 ENDIF ()
52
53 IF (WTF_USE_CURL)
54   LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/curl")
55 ENDIF ()
56
57 SET(WebKit_LIBRARIES
58     ${JavaScriptCore_LIBRARY_NAME}
59     ${WebCore_LIBRARY_NAME}
60 )
61
62 STRING(TOLOWER ${PORT} WEBKIT_PORT_DIR)
63 INCLUDE_IF_EXISTS(${WEBKIT_DIR}/${WEBKIT_PORT_DIR}/CMakeLists${PORT}.txt)
64
65 ADD_DEFINITIONS(-DBUILDING_WebKit)
66 INCLUDE_DIRECTORIES(${WebKit_INCLUDE_DIRECTORIES})
67 ADD_LIBRARY(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
68 TARGET_LINK_LIBRARIES(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES})
69
70 IF (WebKit_LINK_FLAGS)
71     ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}")
72 ENDIF ()
73
74 SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
75 INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION lib)