[EFL] Add support for building with Geoclue2.
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 01:26:16 +0000 (01:26 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Aug 2014 01:26:16 +0000 (01:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135455

Reviewed by Gyuyoung Kim.

.:
* Source/cmake/OptionsEfl.cmake: Add gio-unix if ENABLE_GEOLOCATION
is set.

Source/WebCore:
No new tests required, no new functionality.

* PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
and include gio-unix path.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@171904 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/cmake/OptionsEfl.cmake

index 80a716f..c9414e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2014-07-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [EFL] Add support for building with Geoclue2.
+        https://bugs.webkit.org/show_bug.cgi?id=135455
+
+        Reviewed by Gyuyoung Kim.
+
+        * Source/cmake/OptionsEfl.cmake: Add gio-unix if ENABLE_GEOLOCATION
+        is set.
+
 2014-07-31  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
index afb7cc0..129cc52 100644 (file)
@@ -1,3 +1,15 @@
+2014-07-31  Carlos Alberto Lopez Perez  <clopez@igalia.com>
+
+        [EFL] Add support for building with Geoclue2.
+        https://bugs.webkit.org/show_bug.cgi?id=135455
+
+        Reviewed by Gyuyoung Kim.
+
+        No new tests required, no new functionality.
+
+        * PlatformEfl.cmake: Generate derived sources for Geoclue2Interface
+        and include gio-unix path.
+
 2014-07-31  Zalan Bujtas  <zalan@apple.com>
 
         Subpixel rendering: Region painting needs to take subpixel accumulation into account.
index 7b45461..424f576 100644 (file)
@@ -206,6 +206,17 @@ list(APPEND WebCore_SOURCES
     plugins/PluginViewNone.cpp
 )
 
+if (WTF_USE_GEOCLUE2)
+    list(APPEND WebCore_SOURCES
+        ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
+    )
+    execute_process(COMMAND pkg-config --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)
+    add_custom_command(
+         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h
+         COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}
+    )
+endif ()
+
 if (ENABLE_BATTERY_STATUS OR (EFL_REQUIRED_VERSION VERSION_LESS 1.8))
     list(APPEND WebCore_INCLUDE_DIRECTORIES ${DBUS_INCLUDE_DIRS})
     list(APPEND WebCore_INCLUDE_DIRECTORIES ${E_DBUS_INCLUDE_DIRS})
@@ -272,6 +283,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     ${EVAS_INCLUDE_DIRS}
     ${FREETYPE2_INCLUDE_DIRS}
     ${GEOCLUE_INCLUDE_DIRS}
+    ${GIO_UNIX_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIR}
     ${LIBXSLT_INCLUDE_DIR}
     ${SQLITE_INCLUDE_DIR}
index 2011275..f3a432c 100644 (file)
@@ -19,7 +19,11 @@ find_package(JPEG REQUIRED)
 find_package(PNG REQUIRED)
 find_package(ZLIB REQUIRED)
 
-find_package(GLIB 2.38.0 REQUIRED COMPONENTS gio gobject gthread)
+set(glib_components gio gobject gthread)
+if (ENABLE_GEOLOCATION)
+    list(APPEND glib_components gio-unix)
+endif ()
+find_package(GLIB 2.38.0 REQUIRED COMPONENTS ${glib_components})
 find_package(LibSoup 2.42.0 REQUIRED)
 
 set(WTF_USE_SOUP 1)