# - Try to find the Gcrypt library # Once run this will define # # Gcrypt_FOUND # Gcrypt_CFLAGS # Gcrypt_LIBRARIES FIND_PROGRAM(libgcrypt_config_executable NAMES libgcrypt-config) # if libgcrypt-config has been found IF(libgcrypt_config_executable) EXEC_PROGRAM(${libgcrypt_config_executable} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE Gcrypt_LIBRARIES) EXEC_PROGRAM(${libgcrypt_config_executable} ARGS --cflags RETURN_VALUE _return_VALUE OUTPUT_VARIABLE Gcrypt_CFLAGS) IF(Gcrypt_LIBRARIES AND Gcrypt_CFLAGS) SET(Gcrypt_FOUND TRUE) ENDIF(Gcrypt_LIBRARIES AND Gcrypt_CFLAGS) ENDIF(libgcrypt_config_executable) if(Gcrypt_FOUND) if (NOT Gcrypt_FIND_QUIETLY) message(STATUS "Found libgcrypt: ${Gcrypt_LIBRARIES}") endif (NOT Gcrypt_FIND_QUIETLY) else(Gcrypt_FOUND) if (Gcrypt_FIND_REQUIRED) message(FATAL_ERROR "Could not find libgcrypt libraries") endif (Gcrypt_FIND_REQUIRED) endif(Gcrypt_FOUND) MARK_AS_ADVANCED(Gcrypt_CFLAGS Gcrypt_LIBRARIES)