You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FindGpg_Error.cmake 1.1KB

123456789101112131415161718192021222324252627282930313233343536
  1. # - Find gpg-error
  2. # Find the native GPG_ERROR includes and library
  3. #
  4. # GPG_ERROR_FOUND - True if gpg-error found.
  5. # GPG_ERROR_INCLUDE_DIR - where to find gpg-error.h, etc.
  6. # GPG_ERROR_LIBRARIES - List of libraries when using gpg-error.
  7. if (GPG_ERROR_INCLUDE_DIR AND GPG_ERROR_LIBRARIES)
  8. set(GPG_ERROR_FIND_QUIETLY TRUE)
  9. endif (GPG_ERROR_INCLUDE_DIR AND GPG_ERROR_LIBRARIES)
  10. # Include dir
  11. find_path(GPG_ERROR_INCLUDE_DIR
  12. NAMES
  13. gpg-error.h
  14. )
  15. # Library
  16. find_library(GPG_ERROR_LIBRARY
  17. NAMES gpg-error
  18. )
  19. # handle the QUIETLY and REQUIRED arguments and set GPG_ERROR_FOUND to TRUE if
  20. # all listed variables are TRUE
  21. INCLUDE(FindPackageHandleStandardArgs)
  22. FIND_PACKAGE_HANDLE_STANDARD_ARGS(GPG_ERROR DEFAULT_MSG GPG_ERROR_LIBRARY GPG_ERROR_INCLUDE_DIR)
  23. IF(GPG_ERROR_FOUND)
  24. SET( GPG_ERROR_LIBRARIES ${GPG_ERROR_LIBRARY} )
  25. ELSE(GPG_ERROR_FOUND)
  26. SET( GPG_ERROR_LIBRARIES )
  27. ENDIF(GPG_ERROR_FOUND)
  28. # Lastly make it so that the GPG_ERROR_LIBRARY and GPG_ERROR_INCLUDE_DIR variables
  29. # only show up under the advanced options in the gui cmake applications.
  30. MARK_AS_ADVANCED( GPG_ERROR_LIBRARY GPG_ERROR_INCLUDE_DIR )