mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[common] cmake: correctly link static libbfd.a
When linking against libbfd.so, just passing libbfd.so to the compiler is sufficient. When linking against the static version libbfd.a, however, we must additionally link against libiberty.a and libz.a. This commit adds a CMake helper to find the correct libraries that need to be passed to link against libbfd correctly.
This commit is contained in:
@@ -16,7 +16,8 @@ add_library(lg_common_platform_code STATIC
|
||||
)
|
||||
|
||||
if(ENABLE_BACKTRACE)
|
||||
target_link_libraries(lg_common_platform_code bfd)
|
||||
find_package(BFD)
|
||||
target_link_libraries(lg_common_platform_code ${BFD_LIBRARIES})
|
||||
endif()
|
||||
|
||||
target_link_libraries(lg_common_platform_code
|
||||
|
Reference in New Issue
Block a user