# Find Netatalk's libatalk.
#
# Result variables:
#   NETATALK_FOUND
#   NETATALK_INCLUDE_DIRS
#   NETATALK_LIBRARIES
#
# Optional cache hints:
#   NETATALK_ROOT
#   NETATALK_INCLUDE_DIR
#   NETATALK_LIBRARY

find_path(NETATALK_INCLUDE_DIR
    NAMES atalk/adouble.h
    HINTS ${NETATALK_ROOT}
    PATH_SUFFIXES include
)

find_library(NETATALK_LIBRARY
    NAMES atalk libatalk
    HINTS ${NETATALK_ROOT}
    PATH_SUFFIXES lib lib64
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Netatalk
    REQUIRED_VARS NETATALK_INCLUDE_DIR NETATALK_LIBRARY
)

if(NETATALK_FOUND)
    set(NETATALK_INCLUDE_DIRS ${NETATALK_INCLUDE_DIR})
    set(NETATALK_LIBRARIES ${NETATALK_LIBRARY})
endif()

mark_as_advanced(NETATALK_INCLUDE_DIR NETATALK_LIBRARY)
