[EFL] Rewrite the EFL-related Find modules
authorrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Sep 2012 15:33:04 +0000 (15:33 +0000)
committerrakuco@webkit.org <rakuco@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Sep 2012 15:33:04 +0000 (15:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=95237

Reviewed by Kenneth Rohde Christiansen.

.:

FindEFL.cmake had several problems which caused unnecessary trouble
when building the EFL port under some setups:

o It looked for some modules (such as ecore) more than once for no
reason, which led to people adding libraries and include paths in
different ways across the build system.

o It depended on pkg-config being present for the searches to
succeed.

o It obtained the library definitions from pkg-config, so
${FOO_LIBRARIES} would be set to something like "foo;bar" which
expanded to "-lfoo -lbar" to the linker. If a wrong -L<path> was
passed before that, the wrong library installation would end up
being picked up.

o Due to the problem above, we also needed to set the LINK_FLAGS
property for each target with the value of ${FOO_LDFLAGS}, which was
also obtained from pkg-config and sort of compensated the fact that
the libraries did not use absolute paths and added the required -L
paths. This also included dependencies for these libraries, so we
ended up including libraries indirectly, which is bad.

We have now replaced that file with a set of Find-modules which are
much more granular, each of them responsible for looking for a
single library and its components and setting library and include
locations the right way (with FIND_PATH() and FIND_LIBRARY()), so
that all the problems above are fixed.

* Source/cmake/EFLHelpers.cmake: Added.
* Source/cmake/FindEDBus.cmake: Added.
* Source/cmake/FindEFL.cmake: Removed.
* Source/cmake/FindEcore.cmake: Added.
* Source/cmake/FindEdje.cmake: Added.
* Source/cmake/FindEeze.cmake: Added.
* Source/cmake/FindEfreet.cmake: Added.
* Source/cmake/FindEina.cmake: Added.
* Source/cmake/FindEvas.cmake: Added.
* Source/cmake/OptionsEfl.cmake:

Source/JavaScriptCore:

* CMakeLists.txt: Stop setting the LINK_FLAGS property.
* PlatformEfl.cmake: Ditto.
* shell/PlatformEfl.cmake: Ditto.

Source/WebCore:

* CMakeLists.txt: Stop setting the LINK_FLAGS property now that no
port sets WebCore_LINK_FLAGS.
* PlatformEfl.cmake: Add libraries and include directories for
each Enlightenment Foundation Library used by the port.

Source/WebKit:

* PlatformEfl.cmake: Stop setting the LINK_FLAGS property and add
libraries and include directories for each Enlightenment
Foundation Library used by the port.

Source/WebKit2:

* CMakeLists.txt: Stop setting the LINK_FLAGS property.
* PlatformEfl.cmake: Add libraries and include directories for
each Enlightenment Foundation Library used by the port.

Source/WTF:

* CMakeLists.txt: Stop setting the LINK_FLAGS property.
* PlatformEfl.cmake: Add libraries and include directories for
each Enlightenment Foundation Library used by the port.

Tools:

* DumpRenderTree/efl/CMakeLists.txt: Stop setting the LINK_FLAGS
property and include all the Enlightenment Foundation Libraries
required by the target.
* EWebLauncher/CMakeLists.txt: Ditto.
* MiniBrowser/efl/CMakeLists.txt: Ditto.
* TestWebKitAPI/PlatformEfl.cmake: Add missing include directories
now that they are not added implicitly.
* WebKitTestRunner/CMakeLists.txt: Stop setting the LINK_FLAGS
property.
* WebKitTestRunner/PlatformEfl.cmake: Stop setting the LINK_FLAGS
property and include all the Enlightenment Foundation Libraries
required by the target.

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

33 files changed:
ChangeLog
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformEfl.cmake
Source/JavaScriptCore/shell/PlatformEfl.cmake
Source/WTF/ChangeLog
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/PlatformEfl.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformEfl.cmake
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/cmake/EFLHelpers.cmake [new file with mode: 0644]
Source/cmake/FindEFL.cmake [deleted file]
Source/cmake/FindE_DBus.cmake [new file with mode: 0644]
Source/cmake/FindEcore.cmake [new file with mode: 0644]
Source/cmake/FindEdje.cmake [new file with mode: 0644]
Source/cmake/FindEeze.cmake [new file with mode: 0644]
Source/cmake/FindEfreet.cmake [new file with mode: 0644]
Source/cmake/FindEina.cmake [new file with mode: 0644]
Source/cmake/FindEvas.cmake [new file with mode: 0644]
Source/cmake/OptionsEfl.cmake
Tools/ChangeLog
Tools/DumpRenderTree/efl/CMakeLists.txt
Tools/EWebLauncher/CMakeLists.txt
Tools/MiniBrowser/efl/CMakeLists.txt
Tools/TestWebKitAPI/PlatformEfl.cmake
Tools/WebKitTestRunner/CMakeLists.txt
Tools/WebKitTestRunner/PlatformEfl.cmake

index 74a692b..1936d0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        FindEFL.cmake had several problems which caused unnecessary trouble
+        when building the EFL port under some setups:
+
+        o It looked for some modules (such as ecore) more than once for no
+        reason, which led to people adding libraries and include paths in
+        different ways across the build system.
+
+        o It depended on pkg-config being present for the searches to
+        succeed.
+
+        o It obtained the library definitions from pkg-config, so
+        ${FOO_LIBRARIES} would be set to something like "foo;bar" which
+        expanded to "-lfoo -lbar" to the linker. If a wrong -L<path> was
+        passed before that, the wrong library installation would end up
+        being picked up.
+
+        o Due to the problem above, we also needed to set the LINK_FLAGS
+        property for each target with the value of ${FOO_LDFLAGS}, which was
+        also obtained from pkg-config and sort of compensated the fact that
+        the libraries did not use absolute paths and added the required -L
+        paths. This also included dependencies for these libraries, so we
+        ended up including libraries indirectly, which is bad.
+
+        We have now replaced that file with a set of Find-modules which are
+        much more granular, each of them responsible for looking for a
+        single library and its components and setting library and include
+        locations the right way (with FIND_PATH() and FIND_LIBRARY()), so
+        that all the problems above are fixed.
+
+        * Source/cmake/EFLHelpers.cmake: Added.
+        * Source/cmake/FindEDBus.cmake: Added.
+        * Source/cmake/FindEFL.cmake: Removed.
+        * Source/cmake/FindEcore.cmake: Added.
+        * Source/cmake/FindEdje.cmake: Added.
+        * Source/cmake/FindEeze.cmake: Added.
+        * Source/cmake/FindEfreet.cmake: Added.
+        * Source/cmake/FindEina.cmake: Added.
+        * Source/cmake/FindEvas.cmake: Added.
+        * Source/cmake/OptionsEfl.cmake:
+
 2012-09-11  Simon Hausmann  <simon.hausmann@nokia.com>
 
         [Qt] In-source builds are broken
index 1dff195..2065c5b 100644 (file)
@@ -409,10 +409,6 @@ TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES}
 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
-IF (JavaScriptCore_LINK_FLAGS)
-    ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
-ENDIF ()
-
 IF (SHARED_CORE)
     SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
index 96cc8bf..e92f022 100644 (file)
@@ -1,5 +1,16 @@
 2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
 
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+        * PlatformEfl.cmake: Ditto.
+        * shell/PlatformEfl.cmake: Ditto.
+
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
         [EFL] Unreviewed build fix after r128065.
 
         * CMakeLists.txt: Link against WTF for FastMalloc symbols, which
index 78a3a1f..3b41155 100644 (file)
@@ -18,7 +18,3 @@ IF (ENABLE_GLIB_SUPPORT)
     ${JAVASCRIPTCORE_DIR}/wtf/gobject
   )
 ENDIF ()
-
-LIST(APPEND JavaScriptCore_LINK_FLAGS
-    ${ECORE_LDFLAGS}
-)
index 5375572..22fe20a 100644 (file)
@@ -3,7 +3,3 @@ LIST(APPEND JSC_LIBRARIES
     ${ECORE_LIBRARIES}
     ${CMAKE_DL_LIBS}
 )
-
-LIST(APPEND JSC_LINK_FLAGS
-    ${ECORE_LDFLAGS}
-)
index 59fc8c2..4e62adf 100644 (file)
@@ -1,3 +1,14 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+        * PlatformEfl.cmake: Add libraries and include directories for
+        each Enlightenment Foundation Library used by the port.
+
 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         [Qt] Add a configure step to the Qt build system
index 679b20e..847807f 100644 (file)
@@ -217,7 +217,3 @@ ADD_DEFINITIONS(-DBUILDING_WTF)
 ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
 TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
 SET_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
-
-IF (WTF_LINK_FLAGS)
-    ADD_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} LINK_FLAGS "${WTF_LINK_FLAGS}")
-ENDIF ()
index eb85fb9..05ad847 100644 (file)
@@ -15,6 +15,7 @@ LIST(APPEND WTF_LIBRARIES
     pthread
     ${GLIB_LIBRARIES}
     ${GLIB_GIO_LIBRARIES}
+    ${GLIB_GOBJECT_LIBRARIES}
     ${ICU_LIBRARIES}
     ${ICU_I18N_LIBRARIES}
     ${ECORE_LIBRARIES}
@@ -24,15 +25,10 @@ LIST(APPEND WTF_LIBRARIES
     ${CMAKE_DL_LIBS}
 )
 
-LIST(APPEND WTF_LINK_FLAGS
-    ${ECORE_LDFLAGS}
-    ${ECORE_EVAS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 LIST(APPEND WTF_INCLUDE_DIRECTORIES
     ${ECORE_INCLUDE_DIRS}
     ${ECORE_EVAS_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
     ${ICU_INCLUDE_DIRS}
index b3616b6..e5683b3 100644 (file)
@@ -2719,7 +2719,6 @@ SET(IDL_ATTRIBUTES_FILE ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
 INCLUDE(${WEBCORE_DIR}/UseJSC.cmake)
 
 SET(WebCore_LIBRARIES ${WTF_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_NAME})
-SET(WebCore_LINK_FLAGS "")
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 # ANGLE tokenizer & parser
@@ -2964,11 +2963,6 @@ ENDIF ()
 
 TARGET_LINK_LIBRARIES(${WebCore_LIBRARY_NAME} ${WebCore_LIBRARIES})
 
-IF (WebCore_LINK_FLAGS)
-    ADD_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
-    ADD_TARGET_PROPERTIES(${WebCoreTestSupport_LIBRARY_NAME} LINK_FLAGS "${WebCore_LINK_FLAGS}")
-ENDIF ()
-
 IF (SHARED_CORE)
     SET_TARGET_PROPERTIES(${WebCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
     INSTALL(TARGETS ${WebCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
index 82c7dac..0e3222f 100644 (file)
@@ -1,3 +1,15 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * CMakeLists.txt: Stop setting the LINK_FLAGS property now that no
+        port sets WebCore_LINK_FLAGS.
+        * PlatformEfl.cmake: Add libraries and include directories for
+        each Enlightenment Foundation Library used by the port.
+
 2012-09-11  Csaba Osztrogonác  <ossy@webkit.org>
 
         [Qt] Unreviewed, rolling out 128054, because it broke the Windows build.
index b9af98e..793c821 100644 (file)
@@ -1,8 +1,3 @@
-LIST(APPEND WebCore_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-)
-
 LIST(APPEND WebCore_INCLUDE_DIRECTORIES
   "${WEBCORE_DIR}/accessibility/efl"
   "${WEBCORE_DIR}/page/efl"
@@ -194,9 +189,15 @@ ENDIF ()
 
 LIST(APPEND WebCore_LIBRARIES
   ${CAIRO_LIBRARIES}
+  ${ECORE_LIBRARIES}
+  ${ECORE_EVAS_LIBRARIES}
+  ${ECORE_FILE_LIBRARIES}
   ${ECORE_X_LIBRARIES}
+  ${E_DBUS_LIBRARIES}
+  ${E_DBUS_EUKIT_LIBRARIES}
+  ${EDJE_LIBRARIES}
   ${EEZE_LIBRARIES}
-  ${EFLDEPS_LIBRARIES}
+  ${EINA_LIBRARIES}
   ${EVAS_LIBRARIES}
   ${FONTCONFIG_LIBRARIES}
   ${FREETYPE_LIBRARIES}
@@ -215,9 +216,15 @@ LIST(APPEND WebCore_LIBRARIES
 
 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}
   ${EEZE_INCLUDE_DIRS}
-  ${EFLDEPS_INCLUDE_DIRS}
+  ${EINA_INCLUDE_DIRS}
   ${EVAS_INCLUDE_DIRS}
   ${FREETYPE_INCLUDE_DIRS}
   ${ICU_INCLUDE_DIRS}
index 7c1343b..4084fc2 100644 (file)
@@ -1,3 +1,14 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * PlatformEfl.cmake: Stop setting the LINK_FLAGS property and add
+        libraries and include directories for each Enlightenment
+        Foundation Library used by the port.
+
 2012-09-11  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
 
         [Qt] Add a configure step to the Qt build system
index 84f0240..80d1c07 100644 (file)
@@ -1,11 +1,3 @@
-LIST(APPEND WebKit_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EFREET_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${CMAKE_SOURCE_DIR}/Source"
     "${WEBKIT_DIR}/efl/ewk"
@@ -16,13 +8,14 @@ LIST(APPEND WebKit_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/graphics/efl"
     "${WEBCORE_DIR}/platform/network/soup"
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_INPUT_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
     ${EFREET_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
-    ${EUKIT_INCLUDE_DIRS}
-    ${EDBUS_INCLUDE_DIRS}
+    ${HARFBUZZ_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIR}
     ${LIBXSLT_INCLUDE_DIR}
     ${SQLITE_INCLUDE_DIR}
@@ -141,12 +134,13 @@ LIST(APPEND WebKit_SOURCES
 
 LIST(APPEND WebKit_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_INPUT_LIBRARIES}
     ${EFREET_LIBRARIES}
-    ${EUKIT_LIBRARIES}
-    ${EDBUS_LIBRARIES}
+    ${EVAS_LIBRARIES}
     ${FREETYPE_LIBRARIES}
+    ${HARFBUZZ_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${SQLITE_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
@@ -309,13 +303,6 @@ SET(EWKUnitTests_INCLUDE_DIRECTORIES
     ${EDJE_INCLUDE_DIRS}
 )
 
-SET(EWKUnitTests_LINK_FLAGS
-    ${ECORE_LDFLAGS}
-    ${ECORE_EVAS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-    ${EDJE_LDFLAGS}
-)
-
 IF (ENABLE_GLIB_SUPPORT)
     LIST(APPEND EWKUnitTests_INCLUDE_DIRECTORIES "${WTF_DIR}/wtf/gobject")
     LIST(APPEND EWKUnitTests_LIBRARIES
@@ -349,7 +336,6 @@ IF (ENABLE_API_TESTS)
         ADD_TEST(${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${testName})
         SET_TESTS_PROPERTIES(${testName} PROPERTIES TIMEOUT 60)
         TARGET_LINK_LIBRARIES(${testName} ${EWKUnitTests_LIBRARIES} ewkTestUtils)
-        ADD_TARGET_PROPERTIES(${testName} LINK_FLAGS "${EWKUnitTests_LINK_FLAGS}")
         SET_TARGET_PROPERTIES(${testName} PROPERTIES FOLDER "WebKit")
     ENDFOREACH ()
 ENDIF ()
index f2ba747..16e6eab 100644 (file)
@@ -604,10 +604,6 @@ TARGET_LINK_LIBRARIES(${WebProcess_EXECUTABLE_NAME} ${WebProcess_LIBRARIES})
 SET_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} PROPERTIES FOLDER "WebKit")
 
 SET_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
-IF (WebKit2_LINK_FLAGS)
-    ADD_TARGET_PROPERTIES(${WebKit2_LIBRARY_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
-    ADD_TARGET_PROPERTIES(${WebProcess_EXECUTABLE_NAME} LINK_FLAGS "${WebKit2_LINK_FLAGS}")
-ENDIF ()
 
 INSTALL(TARGETS ${WebKit2_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
 INSTALL(TARGETS ${WebProcess_EXECUTABLE_NAME} DESTINATION "${EXEC_INSTALL_DIR}")
index 56b2200..df7b999 100644 (file)
@@ -1,3 +1,14 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * CMakeLists.txt: Stop setting the LINK_FLAGS property.
+        * PlatformEfl.cmake: Add libraries and include directories for
+        each Enlightenment Foundation Library used by the port.
+
 2012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
 
         [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
index 08c8cff..9abc6ec 100644 (file)
@@ -1,12 +1,3 @@
-LIST(APPEND WebKit2_LINK_FLAGS
-    ${CAIRO_LDFLAGS}
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EFREET_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 LIST(APPEND WebKit2_SOURCES
     Platform/efl/ModuleEfl.cpp
     Platform/efl/WorkQueueEfl.cpp
@@ -142,11 +133,13 @@ LIST(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/soup"
     "${WTF_DIR}/wtf/gobject"
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
     ${EFREET_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
+    ${HARFBUZZ_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
     ${LIBXML2_INCLUDE_DIR}
     ${LIBXSLT_INCLUDE_DIRS}
@@ -164,10 +157,14 @@ ENDIF ()
 
 LIST(APPEND WebKit2_LIBRARIES
     ${CAIRO_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${EDJE_LIBRARIES}
     ${EFREET_LIBRARIES}
+    ${EINA_LIBRARIES}
+    ${EVAS_LIBRARIES}
     ${Freetype_LIBRARIES}
+    ${HARFBUZZ_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${OPENGL_LIBRARIES}
     ${SQLITE_LIBRARIES}
diff --git a/Source/cmake/EFLHelpers.cmake b/Source/cmake/EFLHelpers.cmake
new file mode 100644 (file)
index 0000000..bf8fbf4
--- /dev/null
@@ -0,0 +1,72 @@
+# - Set of macros and functions that are useful for building the EFL port.
+#
+# The following functions are currently defined:
+# FIND_EFL_LIBRARY(<name> HEADERS <header1> ... HEADER_PREFIXES <prefix1> ... LIBRARY <libname>)
+#     Looks for the header files inside the given prefix directories, and for the library
+#     passed to the LIBRARY parameter.
+#     Two #defines in the form <UPPERCASED_NAME>_VERSION_MAJOR and <UPPERCASED_NAME>_VERSION_MINOR
+#     are looked for in all the given headers, and the first occurrence is used to build the library's
+#     version number.
+#     This function defines the following variables:
+#     - <UPPERCASED_NAME>_INCLUDE_DIRS: All the directories required by this library's headers.
+#     - <UPPERCASED_NAME>_LIBRARIES:    All the libraries required to link against this library.
+#     - <UPPERCASED_NAME>_VERSION:      The library's version in the format "major.minor".
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(CMakeParseArguments)
+
+FUNCTION(FIND_EFL_LIBRARY _name)
+    CMAKE_PARSE_ARGUMENTS(PARAM "" "LIBRARY" "HEADERS;HEADER_PREFIXES" ${ARGN})
+
+    STRING(TOUPPER ${_name} _name_upper)
+    SET(_version_found FALSE)
+
+    FOREACH (_current_header ${PARAM_HEADERS})
+        FIND_PATH(${_current_header}_INCLUDE_DIR NAMES ${_current_header} PATH_SUFFIXES ${PARAM_HEADER_PREFIXES})
+        LIST(APPEND ${_name}_INCLUDE_DIRS "${${_current_header}_INCLUDE_DIR}")
+
+        IF (NOT _version_found)
+            SET (_header_path "${${_current_header}_INCLUDE_DIR}/${_current_header}")
+            IF (EXISTS ${_header_path})
+                FILE(READ "${_header_path}" _header_contents)
+
+                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MAJOR +([0-9]+)" _dummy "${_header_contents}")
+                SET(_version_major "${CMAKE_MATCH_1}")
+                STRING(REGEX MATCH "#define +${_name_upper}_VERSION_MINOR +([0-9]+)" _dummy "${_header_contents}")
+                SET(_version_minor "${CMAKE_MATCH_1}")
+
+                IF (_version_major AND _version_minor)
+                    SET(_version_found TRUE)
+                ENDIF ()
+            ENDIF ()
+        ENDIF ()
+    ENDFOREACH ()
+
+    FIND_LIBRARY(${_name}_LIBRARIES NAMES ${PARAM_LIBRARY})
+
+    SET(${_name}_INCLUDE_DIRS ${${_name}_INCLUDE_DIRS} PARENT_SCOPE)
+    SET(${_name}_LIBRARIES ${${_name}_LIBRARIES} PARENT_SCOPE)
+    SET(${_name}_VERSION "${_version_major}.${_version_minor}" PARENT_SCOPE)
+ENDFUNCTION()
diff --git a/Source/cmake/FindEFL.cmake b/Source/cmake/FindEFL.cmake
deleted file mode 100644 (file)
index 5755e16..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-INCLUDE(FindPkgConfig)
-
-PKG_CHECK_MODULES (EDJE REQUIRED edje>=1.0.0)
-PKG_CHECK_MODULES (ECORE REQUIRED ecore>=1.2.0)
-PKG_CHECK_MODULES (ECORE_EVAS REQUIRED ecore-evas>=1.0.0)
-PKG_CHECK_MODULES (EFLDEPS REQUIRED
-  eina>=1.2.0
-  evas>=1.0.0
-  ecore>=1.2.0
-  ecore-file>=1.0.0
-  ecore-evas>=1.0.999.59763
-  edje>=1.0.0
-  eukit>=1.1.0
-  edbus>=1.1.0
-  ecore-input>=1.0.0
-  eeze>=1.2.99
-  efreet>=1.0.0)
-PKG_CHECK_MODULES (EINA REQUIRED eina>=1.2.0)
-PKG_CHECK_MODULES (ECORE_X ecore-x>=1.0.0)
-PKG_CHECK_MODULES (EVAS REQUIRED evas>=1.0.0)
-PKG_CHECK_MODULES (EUKIT REQUIRED eukit>=1.1.0)
-PKG_CHECK_MODULES (EDBUS REQUIRED edbus>=1.1.0)
-PKG_CHECK_MODULES (EFREET REQUIRED efreet>=1.0.0)
-
-FIND_PROGRAM (EDJE_CC_EXECUTABLE edje_cc)
-IF (NOT EDJE_CC_EXECUTABLE)
-    MESSAGE (FATAL_ERROR "edje_cc could not be found")
-ENDIF ()
diff --git a/Source/cmake/FindE_DBus.cmake b/Source/cmake/FindE_DBus.cmake
new file mode 100644 (file)
index 0000000..5a81998
--- /dev/null
@@ -0,0 +1,62 @@
+# - Try to find E_DBus
+# Once done, this will define
+#
+#  E_DBUS_FOUND - system has E_DBus installed.
+#  E_DBUS_INCLUDE_DIRS - directories which contain the E_DBus headers.
+#  E_DBUS_LIBRARIES - libraries required to link against E_DBus.
+#
+# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# and additional E_DBus libraries can be looked for. Currently, the
+# following libraries can be searched, and they define the following
+# variables if found:
+#
+#  EUKIT - E_DBUS_EUKIT_INCLUDE_DIRS and E_DBUS_EUKIT_LIBRARIES
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(E_DBUS
+    HEADERS E_DBus.h
+    HEADER_PREFIXES e_dbus-1
+    LIBRARY edbus
+)
+
+# Components.
+FIND_EFL_LIBRARY(E_DBUS_EUKIT
+    HEADERS E_Ukit.h
+    HEADER_PREFIXES e_dbus-1
+    LIBRARY eukit
+)
+
+FOREACH(_component ${E_DBus_FIND_COMPONENTS})
+    SET(_e_dbus_component "E_DBUS_${_component}")
+    STRING(TOUPPER ${_e_dbus_component} _UPPER_NAME)
+
+    LIST(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+ENDFOREACH()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
+                                         VERSION_VAR   E_DBUS_VERSION)
diff --git a/Source/cmake/FindEcore.cmake b/Source/cmake/FindEcore.cmake
new file mode 100644 (file)
index 0000000..ec76b65
--- /dev/null
@@ -0,0 +1,80 @@
+# - Try to find Ecore
+# Once done, this will define
+#
+#  ECORE_FOUND - system has Ecore installed.
+#  ECORE_INCLUDE_DIRS - directories which contain the Ecore headers.
+#  ECORE_LIBRARIES - libraries required to link against Ecore.
+#
+# Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
+# and additional Ecore libraries can be looked for. Currently, the
+# 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
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(ECORE
+    HEADERS Ecore.h
+    HEADER_PREFIXES ecore-1
+    LIBRARY ecore
+)
+
+# Components.
+FIND_EFL_LIBRARY(ECORE_EVAS
+    HEADERS Ecore_Evas.h
+    HEADER_PREFIXES ecore-1
+    LIBRARY ecore_evas
+)
+FIND_EFL_LIBRARY(ECORE_FILE
+    HEADERS Ecore_File.h
+    HEADER_PREFIXES ecore-1
+    LIBRARY ecore_file
+)
+FIND_EFL_LIBRARY(ECORE_INPUT
+    HEADERS Ecore_Input.h
+    HEADER_PREFIXES ecore-1
+    LIBRARY ecore_input
+)
+FIND_EFL_LIBRARY(ECORE_X
+    HEADERS Ecore_X.h
+    HEADER_PREFIXES ecore-1
+    LIBRARY ecore_x
+)
+
+FOREACH(_component ${Ecore_FIND_COMPONENTS})
+    SET(_ecore_component "ECORE_${_component}")
+    STRING(TOUPPER ${_ecore_component} _UPPER_NAME)
+
+    LIST(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
+ENDFOREACH()
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
+                                        VERSION_VAR   ECORE_VERSION)
diff --git a/Source/cmake/FindEdje.cmake b/Source/cmake/FindEdje.cmake
new file mode 100644 (file)
index 0000000..01ff8d8
--- /dev/null
@@ -0,0 +1,46 @@
+# - Try to find Edje
+# Once done, this will define
+#
+#  EDJE_FOUND - system has Edje installed.
+#  EDJE_INCLUDE_DIRS - directories which contain the Edje headers.
+#  EDJE_LIBRARIES - libraries required to link against Edje.
+#  EDJE_CC_EXECUTABLE - full path to the `edje_cc' program.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EDJE
+    HEADERS Edje.h
+    HEADER_PREFIXES edje-1
+    LIBRARY edje
+)
+
+FIND_PROGRAM(EDJE_CC_EXECUTABLE
+    NAMES edje_cc
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Edje REQUIRED_VARS EDJE_INCLUDE_DIRS EDJE_LIBRARIES EDJE_CC_EXECUTABLE
+                                       VERSION_VAR   EDJE_VERSION)
diff --git a/Source/cmake/FindEeze.cmake b/Source/cmake/FindEeze.cmake
new file mode 100644 (file)
index 0000000..93edc48
--- /dev/null
@@ -0,0 +1,41 @@
+# - Try to find Eeze
+# Once done, this will define
+#
+#  EEZE_FOUND - system has Eeze installed.
+#  EEZE_INCLUDE_DIRS - directories which contain the Eeze headers.
+#  EEZE_LIBRARIES - libraries required to link against Eeze.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EEZE
+    HEADERS Eeze.h
+    HEADER_PREFIXES eeze-1
+    LIBRARY eeze
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eeze REQUIRED_VARS EEZE_INCLUDE_DIRS EEZE_LIBRARIES
+                                       VERSION_VAR   EEZE_VERSION)
diff --git a/Source/cmake/FindEfreet.cmake b/Source/cmake/FindEfreet.cmake
new file mode 100644 (file)
index 0000000..22d704b
--- /dev/null
@@ -0,0 +1,41 @@
+# - Try to find Efreet
+# Once done, this will define
+#
+#  EFREET_FOUND - system has Efreet installed.
+#  EFREET_INCLUDE_DIRS - directories which contain the Efreet headers.
+#  EFREET_LIBRARIES - libraries required to link against Efreet.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EFREET
+    HEADERS Efreet.h
+    HEADER_PREFIXES efreet-1
+    LIBRARY efreet
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Efreet REQUIRED_VARS EFREET_INCLUDE_DIRS EFREET_LIBRARIES
+                                         VERSION_VAR   EFREET_VERSION)
diff --git a/Source/cmake/FindEina.cmake b/Source/cmake/FindEina.cmake
new file mode 100644 (file)
index 0000000..5ac9480
--- /dev/null
@@ -0,0 +1,41 @@
+# - Try to find Eina
+# Once done, this will define
+#
+#  EINA_FOUND - system has Eina installed.
+#  EINA_INCLUDE_DIRS - directories which contain the Eina headers.
+#  EINA_LIBRARIES - libraries required to link against Eina.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EINA
+    HEADERS Eina.h eina_main.h
+    HEADER_PREFIXES eina-1 eina-1/eina
+    LIBRARY eina
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eina REQUIRED_VARS EINA_INCLUDE_DIRS EINA_LIBRARIES
+                                       VERSION_VAR   EINA_VERSION)
diff --git a/Source/cmake/FindEvas.cmake b/Source/cmake/FindEvas.cmake
new file mode 100644 (file)
index 0000000..ce75eae
--- /dev/null
@@ -0,0 +1,41 @@
+# - Try to find Evas
+# Once done, this will define
+#
+#  EVAS_FOUND - system has Evas installed.
+#  EVAS_INCLUDE_DIRS - directories which contain the Evas headers.
+#  EVAS_LIBRARIES - libraries required to link against Evas.
+#
+# Copyright (C) 2012 Intel Corporation. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  Redistributions in binary form must reproduce the above copyright
+#     notice, this list of conditions and the following disclaimer in the
+#     documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
+# IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+INCLUDE(EFLHelpers)
+
+FIND_EFL_LIBRARY(EVAS
+    HEADERS Evas.h
+    HEADER_PREFIXES evas-1
+    LIBRARY evas
+)
+
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Evas REQUIRED_VARS EVAS_INCLUDE_DIRS EVAS_LIBRARIES
+                                       VERSION_VAR   EVAS_VERSION)
index 525bf0f..e0b026e 100644 (file)
@@ -8,7 +8,6 @@ ADD_DEFINITIONS(-DWTF_PLATFORM_EFL=1)
 SET(WTF_PLATFORM_EFL 1)
 
 FIND_PACKAGE(Cairo 1.10 REQUIRED)
-FIND_PACKAGE(EFL REQUIRED)
 FIND_PACKAGE(Fontconfig 2.8.0 REQUIRED)
 FIND_PACKAGE(Sqlite REQUIRED)
 FIND_PACKAGE(LibXml2 2.6 REQUIRED)
@@ -99,14 +98,18 @@ WEBKIT_OPTION_END()
 
 OPTION(ENABLE_ECORE_X "Enable Ecore_X specific usage (cursor, bell)" ON)
 IF (ENABLE_ECORE_X)
-    IF (ECORE_X_FOUND)
-        MESSAGE(STATUS "Using Ecore-X to provide extended support.")
-        ADD_DEFINITIONS(-DHAVE_ECORE_X)
-    ELSE ()
-        MESSAGE(ERROR "Requested Ecore-X but it was not found!")
-    ENDIF ()
+    LIST(APPEND ECORE_ADDITIONAL_COMPONENTS X)
+    ADD_DEFINITIONS(-DHAVE_ECORE_X)
 ENDIF ()
 
+FIND_PACKAGE(Eina 1.2 REQUIRED)
+FIND_PACKAGE(Evas 1.0 REQUIRED)
+FIND_PACKAGE(Ecore 1.2 COMPONENTS Evas File Input ${ECORE_ADDITIONAL_COMPONENTS})
+FIND_PACKAGE(Edje 1.0 REQUIRED)
+FIND_PACKAGE(Eeze 1.2 REQUIRED)
+FIND_PACKAGE(Efreet 1.0 REQUIRED)
+FIND_PACKAGE(E_DBus 1.1 COMPONENTS EUKit)
+
 FIND_PACKAGE(Freetype REQUIRED)
 FIND_PACKAGE(HarfBuzz REQUIRED)
 SET(WTF_USE_FREETYPE 1)
index 8d19929..177dfda 100644 (file)
@@ -1,3 +1,23 @@
+2012-09-11  Raphael Kubo da Costa  <rakuco@webkit.org>
+
+        [EFL] Rewrite the EFL-related Find modules
+        https://bugs.webkit.org/show_bug.cgi?id=95237
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * DumpRenderTree/efl/CMakeLists.txt: Stop setting the LINK_FLAGS
+        property and include all the Enlightenment Foundation Libraries
+        required by the target.
+        * EWebLauncher/CMakeLists.txt: Ditto.
+        * MiniBrowser/efl/CMakeLists.txt: Ditto.
+        * TestWebKitAPI/PlatformEfl.cmake: Add missing include directories
+        now that they are not added implicitly.
+        * WebKitTestRunner/CMakeLists.txt: Stop setting the LINK_FLAGS
+        property.
+        * WebKitTestRunner/PlatformEfl.cmake: Stop setting the LINK_FLAGS
+        property and include all the Enlightenment Foundation Libraries
+        required by the target.
+
 2012-09-11  Christophe Dumez  <christophe.dumez@intel.com>
 
         [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota
index 7d99f07..7f3563d 100644 (file)
@@ -32,9 +32,12 @@ SET(DumpRenderTree_LIBRARIES
     ${WebKit_LIBRARY_NAME}
     ${WTF_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_FILE_LIBRARIES}
+    ${ECORE_INPUT_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${LIBXML2_LIBRARIES}
@@ -96,21 +99,19 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
     ${WEBCORE_DIR}/bindings/js
     ${WEBCORE_DIR}/testing/js
     ${CAIRO_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_FILE_INCLUDE_DIRS}
+    ${ECORE_INPUT_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${FONTCONFIG_INCLUDE_DIR}
     ${GLIB_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
-SET(DumpRenderTree_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 # FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
 # structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
 ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
@@ -121,10 +122,8 @@ INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
 
 ADD_EXECUTABLE(DumpRenderTree ${DumpRenderTree_SOURCES})
 TARGET_LINK_LIBRARIES(DumpRenderTree ${DumpRenderTree_LIBRARIES})
-ADD_TARGET_PROPERTIES(DumpRenderTree LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(DumpRenderTree PROPERTIES FOLDER "Tools")
 
 ADD_EXECUTABLE(ImageDiff ${ImageDiff_SOURCES})
 TARGET_LINK_LIBRARIES(ImageDiff ${DumpRenderTree_LIBRARIES})
-ADD_TARGET_PROPERTIES(ImageDiff LINK_FLAGS "${DumpRenderTree_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(ImageDiff PROPERTIES FOLDER "Tools")
index 65f983d..817231d 100644 (file)
@@ -9,9 +9,12 @@ SET(EWebLauncher_LIBRARIES
     ${WebCore_LIBRARY_NAME}
     ${WebKit_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_FILE_LIBRARIES}
     ${ECORE_X_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${LIBXML2_LIBRARIES}
     ${LIBXSLT_LIBRARIES}
@@ -23,26 +26,22 @@ SET(EWebLauncher_LIBRARIES
 SET(EWebLauncher_INCLUDE_DIRECTORIES
     "${WEBKIT_DIR}/efl/ewk"
     ${CAIRO_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_FILE_INCLUDE_DIRS}
+    ${ECORE_X_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
     ${LIBSOUP_INCLUDE_DIRS}
 )
 
-SET(EWebLauncher_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
 
 INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
 ADD_EXECUTABLE(EWebLauncher ${EWebLauncher_SOURCES})
 TARGET_LINK_LIBRARIES(EWebLauncher ${EWebLauncher_LIBRARIES})
-ADD_TARGET_PROPERTIES(EWebLauncher LINK_FLAGS "${EWebLauncher_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(EWebLauncher PROPERTIES FOLDER "Tools")
 
 ADD_DEPENDENCIES(EWebLauncher ControlTheme)
index 8e42ff3..22295a5 100644 (file)
@@ -8,9 +8,11 @@ SET(MiniBrowser_SOURCES
 
 SET(MiniBrowser_INCLUDE_DIRECTORIES
     ${CAIRO_INCLUDE_DIRS}
-    ${ECORE_X_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
+    ${ECORE_FILE_INCLUDE_DIRS}
     ${EDJE_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${TOOLS_DIR}/EWebLauncher
     ${WEBKIT2_DIR}/UIProcess/API/efl
@@ -23,9 +25,11 @@ SET(MiniBrowser_LIBRARIES
     ${WebCore_LIBRARY_NAME}
     ${WebKit2_LIBRARY_NAME}
     ${CAIRO_LIBRARIES}
-    ${ECORE_X_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
+    ${ECORE_FILE_LIBRARIES}
     ${EDJE_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${EINA_LIBRARIES}
     ${EVAS_LIBRARIES}
     ${FONTCONFIG_LIBRARIES}
     ${LIBSOUP_LIBRARIES}
@@ -35,13 +39,6 @@ SET(MiniBrowser_LIBRARIES
     ${SQLITE_LIBRARIES}
 )
 
-SET(MiniBrowser_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 IF (ENABLE_GLIB_SUPPORT)
     LIST(APPEND MiniBrowser_LIBRARIES
         ${GLIB_LIBRARIES}
@@ -55,7 +52,6 @@ INCLUDE_DIRECTORIES(${MiniBrowser_INCLUDE_DIRECTORIES})
 
 ADD_EXECUTABLE(MiniBrowser ${MiniBrowser_SOURCES})
 TARGET_LINK_LIBRARIES(MiniBrowser ${MiniBrowser_LIBRARIES})
-ADD_TARGET_PROPERTIES(MiniBrowser LINK_FLAGS "${MiniBrowser_LINK_FLAGS}")
 SET_TARGET_PROPERTIES(MiniBrowser PROPERTIES FOLDER "Tools")
 
 ADD_DEPENDENCIES(MiniBrowser ThemeControl)
index 7f19c67..968a619 100644 (file)
@@ -8,13 +8,15 @@ ADD_CUSTOM_TARGET(forwarding-headersSoupForTestWebKitAPI
 )
 SET(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
 
-INCLUDE_DIRECTORIES(${LIBSOUP_INCLUDE_DIRS}
+INCLUDE_DIRECTORIES(
     ${WEBKIT2_DIR}/UIProcess/API/C/soup
     ${WEBKIT2_DIR}/UIProcess/API/C/efl
     ${WEBKIT2_DIR}/UIProcess/API/efl
     ${ECORE_INCLUDE_DIRS}
     ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
+    ${GLIB_INCLUDE_DIRS}
+    ${LIBSOUP_INCLUDE_DIRS}
 )
 
 SET(test_main_SOURCES
index 3b96b41..e4f4f72 100644 (file)
@@ -82,9 +82,5 @@ TARGET_LINK_LIBRARIES(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
 ADD_EXECUTABLE(WebKitTestRunner ${WebKitTestRunner_SOURCES})
 TARGET_LINK_LIBRARIES(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
 
-IF (WebKitTestRunner_LINK_FLAGS)
-    ADD_TARGET_PROPERTIES(WebKitTestRunner LINK_FLAGS ${WebKitTestRunner_LINK_FLAGS})
-ENDIF ()
-
 ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForWebKitTestRunner_NAME})
 ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
index 084cb50..4ab8966 100644 (file)
@@ -1,10 +1,3 @@
-LIST(APPEND WebKitTestRunner_LINK_FLAGS
-    ${ECORE_X_LDFLAGS}
-    ${EDJE_LDFLAGS}
-    ${EFLDEPS_LDFLAGS}
-    ${EVAS_LDFLAGS}
-)
-
 ADD_CUSTOM_TARGET(forwarding-headersEflForWebKitTestRunner
     COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
 )
@@ -30,17 +23,21 @@ LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
     "${WTF_DIR}/wtf/gobject"
 
     ${CAIRO_INCLUDE_DIRS}
+    ${ECORE_INCLUDE_DIRS}
+    ${ECORE_EVAS_INCLUDE_DIRS}
     ${ECORE_X_INCLUDE_DIRS}
-    ${EFLDEPS_INCLUDE_DIRS}
+    ${EINA_INCLUDE_DIRS}
     ${EVAS_INCLUDE_DIRS}
     ${GLIB_INCLUDE_DIRS}
 )
 
 LIST(APPEND WebKitTestRunner_LIBRARIES
     ${CAIRO_LIBRARIES}
+    ${ECORE_LIBRARIES}
+    ${ECORE_EVAS_LIBRARIES}
     ${ECORE_X_LIBRARIES}
-    ${EDJE_LIBRARIES}
-    ${EFLDEPS_LIBRARIES}
+    ${EINA_LIBRARIES}
+    ${EVAS_LIBRARIES}
     ${GLIB_LIBRARIES}
     ${OPENGL_LIBRARIES}
     ${WTF_LIBRARY_NAME}