Avoid unnecessary initial function call(setVisibleContentRect)
[framework/web/webkit-efl.git] / Source / cmake / FindE_DBus.cmake
1 # - Try to find E_DBus
2 # Once done, this will define
3 #
4 #  E_DBUS_FOUND - system has E_DBus installed.
5 #  E_DBUS_INCLUDE_DIRS - directories which contain the E_DBus headers.
6 #  E_DBUS_LIBRARIES - libraries required to link against E_DBus.
7 #
8 # Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
9 # and additional E_DBus libraries can be looked for. Currently, the
10 # following libraries can be searched, and they define the following
11 # variables if found:
12 #
13 #  EUKIT - E_DBUS_EUKIT_INCLUDE_DIRS and E_DBUS_EUKIT_LIBRARIES
14 #
15 # Copyright (C) 2012 Intel Corporation. All rights reserved.
16 #
17 # Redistribution and use in source and binary forms, with or without
18 # modification, are permitted provided that the following conditions
19 # are met:
20 # 1.  Redistributions of source code must retain the above copyright
21 #     notice, this list of conditions and the following disclaimer.
22 # 2.  Redistributions in binary form must reproduce the above copyright
23 #     notice, this list of conditions and the following disclaimer in the
24 #     documentation and/or other materials provided with the distribution.
25 #
26 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
27 # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
28 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
30 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
33 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
35 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
36 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
38 INCLUDE(EFLHelpers)
39
40 FIND_EFL_LIBRARY(E_DBUS
41     HEADERS E_DBus.h
42     HEADER_PREFIXES e_dbus-1
43     LIBRARY edbus
44 )
45
46 # Components.
47 FIND_EFL_LIBRARY(E_DBUS_EUKIT
48     HEADERS E_Ukit.h
49     HEADER_PREFIXES e_dbus-1
50     LIBRARY eukit
51 )
52
53 FOREACH(_component ${E_DBus_FIND_COMPONENTS})
54     SET(_e_dbus_component "E_DBUS_${_component}")
55     STRING(TOUPPER ${_e_dbus_component} _UPPER_NAME)
56
57     LIST(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
58 ENDFOREACH()
59
60 INCLUDE(FindPackageHandleStandardArgs)
61 FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
62                                          VERSION_VAR   E_DBUS_VERSION)