FindE_DBus.cmake 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. include(EFLHelpers)
  38. FIND_EFL_LIBRARY(E_DBUS
  39. HEADERS E_DBus.h
  40. HEADER_PREFIXES e_dbus-1
  41. LIBRARY edbus
  42. )
  43. # Components.
  44. FIND_EFL_LIBRARY(E_DBUS_EUKIT
  45. HEADERS E_Ukit.h
  46. HEADER_PREFIXES e_dbus-1
  47. LIBRARY eukit
  48. )
  49. foreach (_component ${E_DBus_FIND_COMPONENTS})
  50. set(_e_dbus_component "E_DBUS_${_component}")
  51. string(TOUPPER ${_e_dbus_component} _UPPER_NAME)
  52. list(APPEND _E_DBUS_REQUIRED_COMPONENT_VARS ${_UPPER_NAME}_INCLUDE_DIRS ${_UPPER_NAME}_LIBRARIES)
  53. endforeach ()
  54. include(FindPackageHandleStandardArgs)
  55. FIND_PACKAGE_HANDLE_STANDARD_ARGS(E_DBus REQUIRED_VARS E_DBUS_INCLUDE_DIRS E_DBUS_LIBRARIES ${_E_DBUS_REQUIRED_COMPONENT_VARS}
  56. VERSION_VAR E_DBUS_VERSION)