FindEnchant.cmake 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. # - Try to find Enchant
  2. # Once done, this will define
  3. #
  4. # ENCHANT_INCLUDE_DIRS - the Enchant include drectories
  5. # ENCHANT_LIBRARIES - link these to use Enchant
  6. #
  7. # Copyright (C) 2012 Samsung Electronics
  8. #
  9. # Redistribution and use in source and binary forms, with or without
  10. # modification, are permitted provided that the following conditions
  11. # are met:
  12. # 1. Redistributions of source code must retain the above copyright
  13. # notice, this list of conditions and the following disclaimer.
  14. # 2. Redistributions in binary form must reproduce the above copyright
  15. # notice, this list of conditions and the following disclaimer in the
  16. # documentation and/or other materials provided with the distribution.
  17. #
  18. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS
  19. # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  20. # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  21. # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS
  22. # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  23. # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  24. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  25. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  27. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  28. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. find_package(PkgConfig)
  30. pkg_check_modules(PC_ENCHANT enchant)
  31. find_path(ENCHANT_INCLUDE_DIRS
  32. NAMES enchant.h
  33. PATHS ${PC_ENCHANT_INCLUDEDIR}
  34. ${PC_ENCHANT_INCLUDE_DIRS}
  35. )
  36. find_library(ENCHANT_LIBRARIES
  37. NAMES enchant
  38. PATHS ${PC_ENCHANT_LIBDIR}
  39. ${PC_ENCHANT_LIBRARY_DIRS}
  40. )