Commit 72080605 authored by rakuco@webkit.org's avatar rakuco@webkit.org
Browse files

[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...
parent d66427ec
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
......
......@@ -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}")
......
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.
......
......@@ -18,7 +18,3 @@ IF (ENABLE_GLIB_SUPPORT)
${JAVASCRIPTCORE_DIR}/wtf/gobject
)
ENDIF ()
LIST(APPEND JavaScriptCore_LINK_FLAGS
${ECORE_LDFLAGS}
)
......@@ -3,7 +3,3 @@ LIST(APPEND JSC_LIBRARIES
${ECORE_LIBRARIES}
${CMAKE_DL_LIBS}
)
LIST(APPEND JSC_LINK_FLAGS
${ECORE_LDFLAGS}
)
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
......
......@@ -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 ()
......@@ -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}
......
......@@ -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}")
......
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.
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}
......
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
......
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 ()
......
......@@ -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}")
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
......
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}
......
# - 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()
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 ()
# - 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)
# - 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()