FindEcore.cmake 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. include(EFLHelpers)
  41. FIND_EFL_LIBRARY(ECORE
  42. HEADERS Ecore.h
  43. HEADER_PREFIXES ecore-1
  44. LIBRARY ecore
  45. )
  46. # Components.
  47. # Since EFL version 1.8, include path of Ecore sub modules have been changed
  48. # from ecore-1 to ecore-XXX-1
  49. FIND_EFL_LIBRARY(ECORE_EVAS
  50. HEADERS Ecore_Evas.h
  51. HEADER_PREFIXES ecore-1 ecore-evas-1
  52. LIBRARY ecore_evas
  53. )
  54. FIND_EFL_LIBRARY(ECORE_FILE
  55. HEADERS Ecore_File.h
  56. HEADER_PREFIXES ecore-1 ecore-file-1
  57. LIBRARY ecore_file
  58. )
  59. FIND_EFL_LIBRARY(ECORE_INPUT
  60. HEADERS Ecore_Input.h
  61. HEADER_PREFIXES ecore-1 ecore-input-1
  62. LIBRARY ecore_input
  63. )
  64. FIND_EFL_LIBRARY(ECORE_X
  65. HEADERS Ecore_X.h
  66. HEADER_PREFIXES ecore-1 ecore-x-1
  67. LIBRARY ecore_x
  68. )
  69. FIND_EFL_LIBRARY(ECORE_IMF
  70. HEADERS Ecore_IMF.h
  71. HEADER_PREFIXES ecore-1 ecore-imf-1
  72. LIBRARY ecore_imf
  73. )
  74. FIND_EFL_LIBRARY(ECORE_IMF_EVAS
  75. HEADERS Ecore_IMF_Evas.h
  76. HEADER_PREFIXES ecore-1 ecore-imf-evas-1
  77. LIBRARY ecore_imf_evas
  78. )
  79. foreach (_component ${Ecore_FIND_COMPONENTS})
  80. set(_ecore_component "ECORE_${_component}")
  81. string(TOUPPER ${_ecore_component} _UPPER_NAME)
  82. list(APPEND _ECORE_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
  83. endforeach ()
  84. include(FindPackageHandleStandardArgs)
  85. FIND_PACKAGE_HANDLE_STANDARD_ARGS(Ecore REQUIRED_VARS ECORE_INCLUDE_DIRS ECORE_LIBRARIES ${_ECORE_REQUIRED_COMPONENT_VARS}
  86. VERSION_VAR ECORE_VERSION)