|
|
|
@ -76,8 +76,7 @@ if (STACK_WALKING_LIBUNWIND)
|
|
|
|
|
|
|
|
|
|
set(LIBUNWIND_INCLUDE_DIRS ${LIBUNWIND_INCLUDE_DIR})
|
|
|
|
|
set(LIBDWARF_LIBRARIES ${LIBUNWIND_LIBRARY})
|
|
|
|
|
find_package_handle_standard_args(libunwind DEFAULT_MSG
|
|
|
|
|
LIBUNWIND_LIBRARY LIBUNWIND_INCLUDE_DIR)
|
|
|
|
|
find_package_handle_standard_args(libunwind DEFAULT_MSG LIBUNWIND_LIBRARY LIBUNWIND_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARY)
|
|
|
|
|
list(APPEND _BACKWARD_LIBRARIES ${LIBUNWIND_LIBRARY})
|
|
|
|
|
endif()
|
|
|
|
@ -93,8 +92,7 @@ if (${STACK_DETAILS_AUTO_DETECT})
|
|
|
|
|
find_library(LIBDW_LIBRARY dw)
|
|
|
|
|
set(LIBDW_INCLUDE_DIRS ${LIBDW_INCLUDE_DIR} )
|
|
|
|
|
set(LIBDW_LIBRARIES ${LIBDW_LIBRARY} )
|
|
|
|
|
find_package_handle_standard_args(libdw DEFAULT_MSG
|
|
|
|
|
LIBDW_LIBRARY LIBDW_INCLUDE_DIR)
|
|
|
|
|
find_package_handle_standard_args(libdw DEFAULT_MSG LIBDW_LIBRARY LIBDW_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBDW_INCLUDE_DIR LIBDW_LIBRARY)
|
|
|
|
|
|
|
|
|
|
# find libbfd
|
|
|
|
@ -104,11 +102,8 @@ if (${STACK_DETAILS_AUTO_DETECT})
|
|
|
|
|
find_library(LIBDL_LIBRARY dl)
|
|
|
|
|
set(LIBBFD_INCLUDE_DIRS ${LIBBFD_INCLUDE_DIR} ${LIBDL_INCLUDE_DIR})
|
|
|
|
|
set(LIBBFD_LIBRARIES ${LIBBFD_LIBRARY} ${LIBDL_LIBRARY})
|
|
|
|
|
find_package_handle_standard_args(libbfd DEFAULT_MSG
|
|
|
|
|
LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR
|
|
|
|
|
LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBBFD_INCLUDE_DIR LIBBFD_LIBRARY
|
|
|
|
|
LIBDL_INCLUDE_DIR LIBDL_LIBRARY)
|
|
|
|
|
find_package_handle_standard_args(libbfd DEFAULT_MSG LIBBFD_LIBRARY LIBBFD_INCLUDE_DIR LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBBFD_INCLUDE_DIR LIBBFD_LIBRARY LIBDL_INCLUDE_DIR LIBDL_LIBRARY)
|
|
|
|
|
|
|
|
|
|
# find libdwarf
|
|
|
|
|
find_path(LIBDWARF_INCLUDE_DIR NAMES "libdwarf.h" PATH_SUFFIXES libdwarf)
|
|
|
|
@ -119,13 +114,8 @@ if (${STACK_DETAILS_AUTO_DETECT})
|
|
|
|
|
find_library(LIBDL_LIBRARY dl)
|
|
|
|
|
set(LIBDWARF_INCLUDE_DIRS ${LIBDWARF_INCLUDE_DIR} ${LIBELF_INCLUDE_DIR} ${LIBDL_INCLUDE_DIR})
|
|
|
|
|
set(LIBDWARF_LIBRARIES ${LIBDWARF_LIBRARY} ${LIBELF_LIBRARY} ${LIBDL_LIBRARY})
|
|
|
|
|
find_package_handle_standard_args(libdwarf DEFAULT_MSG
|
|
|
|
|
LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR
|
|
|
|
|
LIBELF_LIBRARY LIBELF_INCLUDE_DIR
|
|
|
|
|
LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBDWARF_INCLUDE_DIR LIBDWARF_LIBRARY
|
|
|
|
|
LIBELF_INCLUDE_DIR LIBELF_LIBRARY
|
|
|
|
|
LIBDL_INCLUDE_DIR LIBDL_LIBRARY)
|
|
|
|
|
find_package_handle_standard_args(libdwarf DEFAULT_MSG LIBDWARF_LIBRARY LIBDWARF_INCLUDE_DIR LIBELF_LIBRARY LIBELF_INCLUDE_DIR LIBDL_LIBRARY LIBDL_INCLUDE_DIR)
|
|
|
|
|
mark_as_advanced(LIBDWARF_INCLUDE_DIR LIBDWARF_LIBRARY LIBELF_INCLUDE_DIR LIBELF_LIBRARY LIBDL_INCLUDE_DIR LIBDL_LIBRARY)
|
|
|
|
|
|
|
|
|
|
if (LIBDW_FOUND)
|
|
|
|
|
LIST(APPEND _BACKWARD_INCLUDE_DIRS ${LIBDW_INCLUDE_DIRS})
|
|
|
|
@ -201,8 +191,7 @@ if(DEFINED _BACKWARD_LIBRARIES)
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
|
find_package_handle_standard_args(Backward
|
|
|
|
|
REQUIRED_VARS ${FIND_PACKAGE_REQUIRED_VARS}
|
|
|
|
|
find_package_handle_standard_args(Backward REQUIRED_VARS ${FIND_PACKAGE_REQUIRED_VARS}
|
|
|
|
|
)
|
|
|
|
|
list(APPEND _BACKWARD_INCLUDE_DIRS ${BACKWARD_INCLUDE_DIR})
|
|
|
|
|
|
|
|
|
|