2010-07-26 Rafael Antognolli <antognolli@profusion.mobi>
[WebKit-https.git] / WebKit / efl / CMakeListsEfl.txt
1 INCLUDE(WebKitEfl)
2
3 LIST(APPEND WebKit_LINK_FLAGS
4     ${ECORE_X_LDFLAGS}
5     ${EDJE_LDFLAGS}
6     ${EFLDEPS_LDFLAGS}
7     ${EVAS_LDFLAGS}
8 )
9
10 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
11     "${WEBKIT_DIR}/efl/ewk"
12     "${WEBKIT_DIR}/efl/WebCoreSupport"
13     ${Cairo_INCLUDE_DIRS}
14     ${ECORE_X_INCLUDE_DIRS}
15     ${EDJE_INCLUDE_DIRS}
16     ${EFLDEPS_INCLUDE_DIRS}
17     ${EVAS_INCLUDE_DIRS}
18     ${LIBXML2_INCLUDE_DIRS}
19     ${LIBXSLT_INCLUDE_DIRS}
20     ${SQLITE_INCLUDE_DIRS}
21 )
22
23 LIST(APPEND WebKit_SOURCES
24     efl/WebCoreSupport/ChromeClientEfl.cpp
25     efl/WebCoreSupport/ContextMenuClientEfl.cpp
26     efl/WebCoreSupport/DragClientEfl.cpp
27     efl/WebCoreSupport/EditorClientEfl.cpp
28     efl/WebCoreSupport/FrameLoaderClientEfl.cpp
29     efl/WebCoreSupport/InspectorClientEfl.cpp
30
31     efl/ewk/ewk_contextmenu.cpp
32     efl/ewk/ewk_cookies.cpp
33     efl/ewk/ewk_frame.cpp
34     efl/ewk/ewk_history.cpp
35     efl/ewk/ewk_main.cpp
36     efl/ewk/ewk_settings.cpp
37     efl/ewk/ewk_util.cpp
38     efl/ewk/ewk_view.cpp
39     efl/ewk/ewk_view_single.c
40     efl/ewk/ewk_window_features.cpp
41 )
42
43 LIST(APPEND WebKit_LIBRARIES
44     ${Cairo_LIBRARIES}
45     ${ECORE_X_LIBRARIES}
46     ${EFLDEPS_LIBRARIES}
47     ${Freetype_LIBRARIES}
48     ${LIBXML2_LIBRARIES}
49     ${Pango_LIBRARIES}
50     ${SQLITE_LIBRARIES}
51 )
52
53 IF (ENABLE_GLIB_SUPPORT)
54   LIST(APPEND WebKit_INCLUDE_DIRECTORIES
55     ${Gdk_INCLUDE_DIRS}
56     ${Glib_INCLUDE_DIRS}
57   )
58   LIST(APPEND WebKit_LIBRARIES
59     ${Glib_LIBRARIES}
60     ${Gdk_LIBRARIES}
61   )
62 ENDIF ()
63
64 IF (WTF_USE_SOUP)
65   LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${LIBSOUP24_INCLUDE_DIRS})
66   LIST(APPEND WebKit_LIBRARIES ${LIBSOUP24_LIBRARIES})
67 ENDIF ()
68
69 IF (WTF_USE_CURL)
70   LIST(APPEND WebKit_INCLUDE_DIRECTORIES ${CURL_INCLUDE_DIRS})
71   LIST(APPEND WebKit_LIBRARIES ${CURL_LIBRARIES})
72 ENDIF ()
73
74 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
75 GENERATE_EDJ(
76     ${WEBKIT_DIR}/efl/DefaultTheme/default.edc
77     ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme/default.edj
78     "-id;${WEBKIT_DIR}/efl/DefaultTheme"
79 )
80
81 SET(EWebLauncher_SOURCES
82     efl/DefaultTheme/default.edj
83     efl/EWebLauncher/main.c
84 )
85
86 SET(EWebLauncher_LIBRARIES
87     ${JavaScriptCore_LIBRARY_NAME}
88     ${WebCore_LIBRARY_NAME}
89     ${WebKit_LIBRARY_NAME}
90     ${Cairo_LIBRARIES}
91     ${ECORE_X_LIBRARIES}
92     ${EDJE_LIBRARIES}
93     ${EFLDEPS_LIBRARIES}
94     ${EVAS_LIBRARIES}
95     ${LIBXML2_LIBRARIES}
96     ${LIBXSLT_LIBRARIES}
97     ${SQLITE_LIBRARIES}
98 )
99
100 SET(EWebLauncher_LINK_FLAGS
101     ${ECORE_X_LDFLAGS}
102     ${EDJE_LDFLAGS}
103     ${EFLDEPS_LDFLAGS}
104     ${EVAS_LDFLAGS}
105 )
106
107 IF (ENABLE_GLIB_SUPPORT)
108   LIST(APPEND EWebLauncher_LIBRARIES
109     ${Gdk_LIBRARIES}
110     ${Glib_LIBRARIES}
111     ${GTHREAD_LIBRARIES}
112   )
113 ENDIF ()
114
115 IF (WTF_USE_SOUP)
116   LIST(APPEND EWebLauncher_LIBRARIES ${LIBSOUP24_LIBRARIES})
117   LIST(APPEND EWebLauncher_LINK_FLAGS ${LIBSOUP24_LDFLAGS})
118 ENDIF ()
119
120 IF (WTF_USE_CURL)
121   LIST(APPEND EWebLauncher_LIBRARIES ${CURL_LIBRARIES})
122   LIST(APPEND EWebLauncher_LINK_FLAGS ${CURL_LDFLAGS})
123 ENDIF ()
124
125 ADD_EXECUTABLE(../Programs/EWebLauncher ${EWebLauncher_SOURCES})
126 TARGET_LINK_LIBRARIES(../Programs/EWebLauncher ${EWebLauncher_LIBRARIES})
127 ADD_TARGET_PROPERTIES(../Programs/EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}")
128
129 IF (SHARED_CORE)
130     SET(LIBS_PRIVATE "-l${WTF_LIBRARY_NAME} -l${JavaScriptCore_LIBRARY_NAME} -l${WebCore_LIBRARY_NAME}")
131 ELSE ()
132     SET(LIBS_PRIVATE "")
133 ENDIF ()
134
135 CONFIGURE_FILE(
136     efl/ewebkit.pc.in
137     ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
138     @ONLY)
139 INSTALL(FILES ${CMAKE_BINARY_DIR}/WebKit/efl/ewebkit.pc
140     DESTINATION lib/pkgconfig)
141
142 UNSET(LIBS_PRIVATE)
143
144 FILE(GLOB EWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/*.h")
145 LIST(REMOVE_ITEM EWebKit_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/efl/ewk/ewk_private.h")
146
147 INSTALL(FILES ${EWebKit_HEADERS}
148         DESTINATION include/EWebKit)