CMakeList.txt: Look for obstack outside libc

As in Alpine Linux.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2021-08-13 14:59:24 -03:00
parent 739bc50b90
commit 5e8ad60d1f
1 changed files with 2 additions and 1 deletions

View File

@ -60,6 +60,7 @@ add_definitions(-D_GNU_SOURCE -DDWARVES_MINOR_VERSION=22)
find_package(DWARF REQUIRED)
find_package(ZLIB REQUIRED)
find_package(argp REQUIRED)
find_package(obstack REQUIRED)
# make sure git submodule(s) are checked out
find_package(Git QUIET)
@ -121,7 +122,7 @@ endif()
add_library(dwarves ${dwarves_LIB_SRCS})
set_target_properties(dwarves PROPERTIES VERSION 1.0.0 SOVERSION 1)
set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBBPF_LIBRARIES} ${ARGP_LIBRARY})
target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES} ${LIBBPF_LIBRARIES} ${ARGP_LIBRARY} ${OBSTACK_LIBRARY})
set(dwarves_emit_LIB_SRCS dwarves_emit.c)
add_library(dwarves_emit ${dwarves_emit_LIB_SRCS})