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.
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.