Skip to content

Commit

Permalink
Conditionalize libdw and libelf linkage to librpmbuild
Browse files Browse the repository at this point in the history
I clearly remember testing the behavior wrt these and concluding that the
cmake exported interface syntax doesn't require conditionalizing.
Clearly it does though, so dunno what I was supposed to have tested
back then.

Suggested-by: Mark Dascher <mark@papertrail.com>
  • Loading branch information
pmatilai committed Dec 19, 2023
1 parent b176bbb commit a5e9e72
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,18 @@ target_link_libraries(librpmbuild PUBLIC librpmio librpm)
target_link_libraries(librpmbuild PRIVATE
libmisc
PkgConfig::POPT
PkgConfig::LIBELF
PkgConfig::LIBDW
LUA::LUA
MAGIC::MAGIC
)

if (LIBDW_FOUND)
target_link_libraries(librpmbuild PRIVATE PkgConfig::LIBDW)
endif()

if (LIBELF_FOUND)
target_link_libraries(librpmbuild PRIVATE PkgConfig::LIBELF)
endif()

if (Iconv_FOUND)
target_link_libraries(librpmbuild PRIVATE Iconv::Iconv)
endif()
Expand Down

0 comments on commit a5e9e72

Please sign in to comment.