FindATK.cmake 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # - Try to find ATK
  2. # Once done, this will define
  3. #
  4. # ATK_INCLUDE_DIRS - the ATK include drectories
  5. # ATK_LIBRARIES - link these to use ATK
  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_ATK atk)
  31. find_path(ATK_INCLUDE_DIRS
  32. NAMES atk/atk.h
  33. HINTS ${PC_ATK_INCLUDEDIR}
  34. ${PC_ATK_INCLUDE_DIRS}
  35. PATH_SUFFIXES atk-1.0
  36. )
  37. find_library(ATK_LIBRARIES
  38. NAMES atk-1.0
  39. HINTS ${PC_ATK_LIBRARY_DIRS}
  40. ${PC_ATK_LIBDIR}
  41. )
  42. include(FindPackageHandleStandardArgs)
  43. FIND_PACKAGE_HANDLE_STANDARD_ARGS(ATK REQUIRED_VARS ATK_INCLUDE_DIRS ATK_LIBRARIES
  44. VERSION_VAR PC_ATK_VERSION)