Avoid linking to ecore_x on Wayland 06/5506/4
authorKondapally Kalyan <kalyan.kondapally@intel.com>
Thu, 4 Jul 2013 17:45:16 +0000 (20:45 +0300)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 8 Jul 2013 20:28:46 +0000 (13:28 -0700)
We donot use ecore_x on Wayland but still link to ecore_x.
This patch makes changes so that we link to ecore_wayland on
Wayland and ecore_x with X.
Change-Id: I46d76a33031d95ddc42b021ff707178b9b64a9c8

Source/JavaScriptCore/PlatformEfl.cmake
Source/WebCore/PlatformEfl.cmake
Source/WebKit2/PlatformEfl.cmake
Source/cmake/FindEcore.cmake
Source/cmake/OptionsTizen.cmake
Tools/WebKitTestRunner/PlatformEfl.cmake

index ae95146..94647db 100755 (executable)
@@ -11,7 +11,7 @@ IF (ENABLE_TIZEN_GC_ACTIVITY_CALLBACK)
         runtime/GCActivityCallbackEfl.cpp
     )
     LIST(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
-        ${ECORE_X_INCLUDE_DIRS}
+        ${ECORE_INCLUDE_DIRS}
         ${EINA_INCLUDE_DIRS}
     )
 ENDIF ()
index fc0a07c..17c6a9c 100755 (executable)
@@ -381,7 +381,6 @@ LIST(APPEND WebCore_LIBRARIES
   ${ECORE_LIBRARIES}
   ${ECORE_EVAS_LIBRARIES}
   ${ECORE_FILE_LIBRARIES}
-  ${ECORE_X_LIBRARIES}
   ${E_DBUS_LIBRARIES}
   ${E_DBUS_EUKIT_LIBRARIES}
   ${EDJE_LIBRARIES}
@@ -403,12 +402,21 @@ LIST(APPEND WebCore_LIBRARIES
   ${ZLIB_LIBRARIES}
 )
 
+IF (WTF_PLATFORM_WAYLAND)
+    LIST(APPEND WebCore_LIBRARIES
+        ${ECORE_WAYLAND_LIBRARIES}
+    )
+ELSE()
+    LIST(APPEND WebCore_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+    )
+ENDIF()
+
 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   ${CAIRO_INCLUDE_DIRS}
   ${ECORE_INCLUDE_DIRS}
   ${ECORE_EVAS_INCLUDE_DIRS}
   ${ECORE_FILE_INCLUDE_DIRS}
-  ${ECORE_X_INCLUDE_DIRS}
   ${E_DBUS_INCLUDE_DIRS}
   ${E_DBUS_EUKIT_INCLUDE_DIRS}
   ${EDJE_INCLUDE_DIRS}
@@ -425,6 +433,16 @@ LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   ${ZLIB_INCLUDE_DIRS}
 )
 
+IF (WTF_PLATFORM_WAYLAND)
+    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${ECORE_WAYLAND_INCLUDE_DIRS}
+    )
+ELSE()
+    LIST(APPEND WebCore_INCLUDE_DIRECTORIES
+        ${ECORE_X_INCLUDE_DIRS}
+    )
+ENDIF()
+
 IF (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
        IF(NOT GST_API_VERSION_1)
                LIST(APPEND WebCore_INCLUDE_DIRECTORIES
index b4b8d18..7f50118 100755 (executable)
@@ -200,7 +200,6 @@ LIST (APPEND WebProcess_SOURCES
 LIST (APPEND WebProcess_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_IMF_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
     ${EFLDEPS_LIBRARIES}
     ${EVAS_LIBRARIES}
@@ -209,6 +208,16 @@ LIST (APPEND WebProcess_LIBRARIES
     ${SQLITE_LIBRARIES}
 )
 
+IF (WTF_PLATFORM_WAYLAND)
+    LIST(APPEND WebProcess_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+    )
+ELSE()
+    LIST(APPEND WebProcess_LIBRARIES
+        ${ECORE_WAYLAND_LIBRARIES}
+    )
+ENDIF()
+
 ADD_CUSTOM_TARGET(forwarding-headerEfl
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
index 38bbf0f..35d25e4 100644 (file)
 # following libraries can be searched, and they define the following
 # variables if found:
 #
-#  EVAS  - ECORE_EVAS_INCLUDE_DIRS and ECORE_EVAS_LIBRARIES
-#  FILE  - ECORE_FILE_INCLUDE_DIRS and ECORE_FILE_LIBRARIES
-#  INPUT - ECORE_INPUT_INCLUDE_DIRS and ECORE_INPUT_LIBRARIES
-#  X     - ECORE_X_INCLUDE_DIRS and ECORE_X_LIBRARIES
+#  EVAS    - ECORE_EVAS_INCLUDE_DIRS and ECORE_EVAS_LIBRARIES
+#  FILE    - ECORE_FILE_INCLUDE_DIRS and ECORE_FILE_LIBRARIES
+#  INPUT   - ECORE_INPUT_INCLUDE_DIRS and ECORE_INPUT_LIBRARIES
+#  X       - When using X, ECORE_X_INCLUDE_DIRS and ECORE_X_LIBRARIES
+#  WAYLAND - When using Wayland, ECORE_WAYLAND_INCLUDE_DIRS and ECORE_WAYLAND_LIBRARIES
 #
 # Copyright (C) 2012 Intel Corporation. All rights reserved.
 #
@@ -62,11 +63,19 @@ FIND_EFL_LIBRARY(ECORE_INPUT
     HEADER_PREFIXES ecore-1
     LIBRARY ecore_input
 )
-FIND_EFL_LIBRARY(ECORE_X
-    HEADERS Ecore_X.h
-    HEADER_PREFIXES ecore-1
-    LIBRARY ecore_x
-)
+IF (ENABLE_ECORE_X)
+    FIND_EFL_LIBRARY(ECORE_X
+        HEADERS Ecore_X.h
+        HEADER_PREFIXES ecore-1
+        LIBRARY ecore_x
+    )
+ELSE()
+    FIND_EFL_LIBRARY(ECORE_WAYLAND
+        HEADERS Ecore_Wayland.h
+        HEADER_PREFIXES ecore-1
+        LIBRARY ecore_wayland
+    )
+ENDIF()
 FIND_EFL_LIBRARY(ECORE_IMF
     HEADERS Ecore_IMF.h Ecore_IMF_Evas.h
     HEADER_PREFIXES ecore-1
index 6bd5d9b..af25d19 100644 (file)
@@ -385,6 +385,7 @@ IF (ENABLE_ECORE_X)
     ADD_DEFINITIONS(-DWTF_PLATFORM_X11=1)
     SET(WTF_PLATFORM_X11 1)
 ELSE ()
+    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS WAYLAND)
     FIND_PACKAGE(Wayland REQUIRED)
     ADD_DEFINITIONS(-DWTF_PLATFORM_WAYLAND=1)
     SET(WTF_PLATFORM_WAYLAND 1)
index 4bfa64a..760488e 100755 (executable)
@@ -25,23 +25,41 @@ LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
     ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
 )
 
+IF (WTF_PLATFORM_WAYLAND)
+    LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+        ${ECORE_WAYLAND_INCLUDE_DIRS}
+    )
+ELSE()
+    LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+        ${ECORE_X_INCLUDE_DIRS}
+    )
+ENDIF()
+
 LIST(APPEND WebKitTestRunner_LIBRARIES
     ${CAIRO_LIBRARIES}
     ${ECORE_LIBRARIES}
     ${ECORE_EVAS_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
     ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${GLIB_LIBRARIES}
     ${WTF_LIBRARY_NAME}
 )
 
+IF (WTF_PLATFORM_WAYLAND)
+    LIST(APPEND WebKitTestRunner_LIBRARIES
+        ${ECORE_WAYLAND_LIBRARIES}
+    )
+ELSE()
+    LIST(APPEND WebKitTestRunner_LIBRARIES
+        ${ECORE_X_LIBRARIES}
+    )
+ENDIF()
+
 LIST(APPEND WebKitTestRunnerInjectedBundle_SOURCES
     ${TOOLS_DIR}/DumpRenderTree/efl/FontManagement.cpp