Avoid unnecessary initial function call(setVisibleContentRect)
[framework/web/webkit-efl.git] / Source / cmake / FindEcore.cmake
1 # - Try to find Ecore
2 # Once done, this will define
3 #
4 #  ECORE_FOUND - system has Ecore installed.
5 #  ECORE_INCLUDE_DIRS - directories which contain the Ecore headers.
6 #  ECORE_LIBRARIES - libraries required to link against Ecore.
7 #
8 # Optionally, the COMPONENTS keyword can be passed to FIND_PACKAGE()
9 # and additional Ecore libraries can be looked for. Currently, the
10 # following libraries can be searched, and they define the following
11 # variables if found:
12 #
13 #  EVAS  - ECORE_EVAS_INCLUDE_DIRS and ECORE_EVAS_LIBRARIES
14 #  FILE  - ECORE_FILE_INCLUDE_DIRS and ECORE_FILE_LIBRARIES
15 #  INPUT - ECORE_INPUT_INCLUDE_DIRS and ECORE_INPUT_LIBRARIES
16 #  X     - ECORE_X_INCLUDE_DIRS and ECORE_X_LIBRARIES
17 #
18 # Copyright (C) 2012 Intel Corporation. All rights reserved.
19 #
20 # Redistribution and use in source and binary forms, with or without
21 # modification, are permitted provided that the following conditions
22 # are met:
23 # 1.  Redistributions of source code must retain the above copyright
24 #     notice, this list of conditions and the following disclaimer.
25 # 2.  Redistributions in binary form must reproduce the above copyright
26 #     notice, this list of conditions and the following disclaimer in the
27 #     documentation and/or other materials provided with the distribution.
28 #
29 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
30 # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
31 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
33 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
36 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
37 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
38 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
39 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40
41 INCLUDE(EFLHelpers)
42
43 FIND_EFL_LIBRARY(ECORE
44     HEADERS Ecore.h
45     HEADER_PREFIXES ecore-1
46     LIBRARY ecore
47 )
48
49 # Components.
50 FIND_EFL_LIBRARY(ECORE_EVAS
51     HEADERS Ecore_Evas.h
52     HEADER_PREFIXES ecore-1
53     LIBRARY ecore_evas
54 )
55 FIND_EFL_LIBRARY(ECORE_FILE
56     HEADERS Ecore_File.h
57     HEADER_PREFIXES ecore-1
58     LIBRARY ecore_file
59 )
60 FIND_EFL_LIBRARY(ECORE_INPUT
61     HEADERS Ecore_Input.h
62     HEADER_PREFIXES ecore-1
63     LIBRARY ecore_input
64 )
65 FIND_EFL_LIBRARY(ECORE_X
66     HEADERS Ecore_X.h
67     HEADER_PREFIXES ecore-1
68     LIBRARY ecore_x
69 )
70 FIND_EFL_LIBRARY(ECORE_IMF
71     HEADERS Ecore_IMF.h Ecore_IMF_Evas.h
72     HEADER_PREFIXES ecore-1
73     LIBRARY ecore_imf
74 )
75
76 FOREACH(_component ${Ecore_FIND_COMPONENTS})
77     SET(_ecore_component "ECORE_${_component}")
78     STRING(TOUPPER ${_ecore_component} _UPPER_NAME)
79
80     LIST(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
81 ENDFOREACH()
82
83 INCLUDE(FindPackageHandleStandardArgs)
84 FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
85                                         VERSION_VAR   ECORE_VERSION)