FIND_PATH(UNWIND_INCLUDE_DIR libunwind.h)
FIND_LIBRARY(UNWIND_LIBRARIES NAMES unwind-x86_64)


IF (UNWIND_LIBRARIES AND UNWIND_INCLUDE_DIR)
   SET(UNWIND_FOUND TRUE)
ENDIF (UNWIND_LIBRARIES AND UNWIND_INCLUDE_DIR)

IF (UNWIND_FOUND)
    IF (NOT UNWIND_FIND_QUIETLY)
       MESSAGE(STATUS "Found UNWIND: ${UNWIND_LIBRARIES}")
    ENDIF(NOT UNWIND_FIND_QUIETLY)
ELSE (UNWIND_FOUND)
    IF (UNWIND_FIND_REQUIRED)
       MESSAGE(FATAL_ERROR "Could not find UNWIND library: ${UNWIND_LIBRARIES}, ${UNWIND_INCLUDE_DIR}")
    ENDIF (UNWIND_FIND_REQUIRED)
ENDIF (UNWIND_FOUND)

MARK_AS_ADVANCED(UNWIND_LIBRARIES UNWIND_INCLUDE_DIR)
