osquery-1/CMake/FindUnwind.cmake
2014-09-23 19:44:58 -07:00

20 lines
623 B
CMake

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)