[CMake] Libraries are installed to /usr/lib and not /usr/lib64 on x86_64
[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/c"
9     "${WEBCORE_DIR}/bridge/jsc"
10     "${WEBCORE_DIR}/css"
11     "${WEBCORE_DIR}/dom"
12     "${WEBCORE_DIR}/editing"
13     "${WEBCORE_DIR}/history"
14     "${WEBCORE_DIR}/html"
15     "${WEBCORE_DIR}/inspector"
16     "${WEBCORE_DIR}/loader"
17     "${WEBCORE_DIR}/loader/appcache"
18     "${WEBCORE_DIR}/loader/icon"
19     "${WEBCORE_DIR}/loader/cache"
20     "${WEBCORE_DIR}/page"
21     "${WEBCORE_DIR}/page/animation"
22     "${WEBCORE_DIR}/platform"
23     "${WEBCORE_DIR}/platform/animation"
24     "${WEBCORE_DIR}/platform/graphics"
25     "${WEBCORE_DIR}/platform/graphics/filters"
26     "${WEBCORE_DIR}/platform/graphics/transforms"
27     "${WEBCORE_DIR}/platform/network"
28     "${WEBCORE_DIR}/platform/sql"
29     "${WEBCORE_DIR}/platform/text"
30     "${WEBCORE_DIR}/plugins"
31     "${WEBCORE_DIR}/rendering"
32     "${WEBCORE_DIR}/rendering/style"
33     "${WEBCORE_DIR}/storage"
34     "${WEBCORE_DIR}/svg"
35     "${WEBCORE_DIR}/svg/graphics"
36     "${WEBCORE_DIR}/svg/properties"
37     "${JAVASCRIPTCORE_DIR}"
38     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
39     "${JAVASCRIPTCORE_DIR}/API"
40     "${JAVASCRIPTCORE_DIR}/assembler"
41     "${JAVASCRIPTCORE_DIR}/bytecode"
42     "${JAVASCRIPTCORE_DIR}/bytecompiler"
43     "${JAVASCRIPTCORE_DIR}/dfg"
44     "${JAVASCRIPTCORE_DIR}/heap"
45     "${JAVASCRIPTCORE_DIR}/debugger"
46     "${JAVASCRIPTCORE_DIR}/interpreter"
47     "${JAVASCRIPTCORE_DIR}/jit"
48     "${JAVASCRIPTCORE_DIR}/llint"
49     "${JAVASCRIPTCORE_DIR}/parser"
50     "${JAVASCRIPTCORE_DIR}/profiler"
51     "${JAVASCRIPTCORE_DIR}/runtime"
52     "${JAVASCRIPTCORE_DIR}/wtf"
53     "${JAVASCRIPTCORE_DIR}/wtf/unicode"
54     "${DERIVED_SOURCES_WEBCORE_DIR}"
55     "${CMAKE_BINARY_DIR}"
56 )
57
58 IF (WTF_USE_SOUP)
59   LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/soup")
60 ENDIF ()
61
62 IF (WTF_USE_CURL)
63   LIST(APPEND WebKit_INCLUDE_DIRECTORIES "${WEBCORE_DIR}/platform/network/curl")
64 ENDIF ()
65
66 SET(WebKit_LIBRARIES
67     ${WebCore_LIBRARY_NAME}
68 )
69
70 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
71
72 ADD_DEFINITIONS(-DBUILDING_WebKit)
73 INCLUDE_DIRECTORIES(${WebKit_INCLUDE_DIRECTORIES})
74 ADD_LIBRARY(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
75 ADD_DEPENDENCIES(${WebKit_LIBRARY_NAME} ${WebCore_LIBRARY_NAME})
76 TARGET_LINK_LIBRARIES(${WebKit_LIBRARY_NAME} ${WebKit_LIBRARIES})
77
78 IF (WebKit_LINK_FLAGS)
79     ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}")
80 ENDIF ()
81
82 IF (VERSION_SCRIPT)
83     ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${VERSION_SCRIPT}")
84 ENDIF ()
85
86 SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
87 INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")