Skip to content

Commit

Permalink
different apporach
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0vity committed Dec 5, 2024
1 parent d80fc1e commit 0f80976
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,9 @@ if(NANO_STACKTRACE_BACKTRACE)
add_definitions(-DNANO_STACKTRACE_BACKTRACE)
add_definitions(-DBOOST_STACKTRACE_USE_BACKTRACE)

find_library(BACKTRACE_LIB backtrace)
if(NOT BACKTRACE_LIB)
file(GLOB_RECURSE BACKTRACE_GLOB_RESULTS
"/usr/lib*/libbacktrace.a"
"/usr/local/lib*/libbacktrace.a")
get_filename_component(BACKTRACE_HINT_DIRS "${BACKTRACE_GLOB_RESULTS}" DIRECTORY)
find_library(BACKTRACE_LIB backtrace HINTS ${BACKTRACE_HINT_DIRS})
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(BACKTRACE libbacktrace)
endif()
endif()

Expand Down

0 comments on commit 0f80976

Please sign in to comment.