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