set( LIBUUID_ROOT_DIR "" CACHE PATH "LIBUUID root directory" )
set( DETECTED_LIBUUID_ROOT_DIR "" )
if( NOT "${LIBUUID_ROOT_DIR}" STREQUAL "" )
  find_path( LIBUUID_INCLUDE_DIR uuid/uuid.h  PATHS ${LIBUUID_ROOT_DIR}/include )
  if( NOT "${LIBUUID_INCLUDE_DIR}" STREQUAL "LIBUUID_INCLUDE_DIR-NOTFOUND" )
    set( DETECTED_LIBUUID_ROOT_DIR ${LIBUUID_ROOT_DIR} )
  endif()
endif()
if( "${DETECTED_LIBUUID_ROOT_DIR}" STREQUAL "" )
  find_path( LIBUUID_INCLUDE_DIR uuid/uuid.h  PATHS /usr/include )
  if( NOT "${LIBUUID_INCLUDE_DIR}" STREQUAL "LIBUUID_INCLUDE_DIR-NOTFOUND" )
    set( DETECTED_LIBUUID_ROOT_DIR /usr )
  endif()
endif()
if( "${DETECTED_LIBUUID_ROOT_DIR}" STREQUAL "" )
  find_path( LIBUUID_INCLUDE_DIR uuid/uuid.h  PATHS /usr/local/include )
  if( NOT "${LIBUUID_INCLUDE_DIR}" STREQUAL "LIBUUID_INCLUDE_DIR-NOTFOUND" )
    set( DETECTED_LIBUUID_ROOT_DIR /usr/local )
  endif()
endif()
if( NOT "${DETECTED_LIBUUID_ROOT_DIR}" STREQUAL "" )
  find_library(LIBUUID_LIBRARY uuid HINTS ${DETECTED_LIBUUID_ROOT_DIR}/lib )
endif()
find_package_handle_standard_args(libuuid DEFAULT_MSG
  LIBUUID_INCLUDE_DIR
  LIBUUID_LIBRARY
)
if(LIBUUID_FOUND)
set(
  LIBUUID_LIBRARIES
  uuid
)
set(LIBUUID_LIBRARY_DIRS ${DETECTED_LIBUUID_ROOT_DIR}/lib)
endif(LIBUUID_FOUND)
mark_as_advanced(
  LIBUUID_INCLUDE_DIR
  LIBUUID_LIBRARIES
  LIBUUID_LIBRARY_DIRS
  LIBUUID_LIBRARY
)

