bombela / backward-cpp

A beautiful stack trace pretty printer for C++
MIT License
3.68k stars 467 forks source link

Find dependencies for statically-linked libdw #250

Closed csw closed 2 years ago

csw commented 2 years ago

BackwardConfig.cmake was not explicitly pulling in the dependencies of libdw (libelf, libz, libpthread, etc.), which made it fail to link when libdw was built as a static library (and therefore didn't explicitly encode those dependencies). This fixes that. For context, I'm trying to make it work with vcpkg, using its version of elfutils. (I'm working on adding a vcpkg port for this library, too.)

I had logic in here to use pkg-config, but doing it that way made it use the system version of libdw instead of the one in vcpkg.