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