mirror of
https://github.com/sstefani/mtrace.git
synced 2025-12-06 16:56:41 +08:00
Merge pull request #9 from coldtobi/fix_libz_liberty_linkage
find_library(liberty)
This commit is contained in:
commit
4007678321
@ -125,9 +125,15 @@ if (NOT DISABLE_CLIENT)
|
|||||||
message(FATAL_ERROR "libbfd not found.")
|
message(FATAL_ERROR "libbfd not found.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
find_library(LIB_IBERTY iberty)
|
||||||
|
if(NOT LIB_IBERTY)
|
||||||
|
message(FATAL_ERROR "liberty not found.")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
pkg_check_modules(LIB_ZLIB REQUIRED zlib)
|
||||||
|
|
||||||
CHECK_INCLUDE_FILES_ERROR("termcap.h" HAVE_TERMCAP_H)
|
CHECK_INCLUDE_FILES_ERROR("termcap.h" HAVE_TERMCAP_H)
|
||||||
|
|
||||||
CHECK_INCLUDE_FILES_ERROR("libiberty/demangle.h" HAVE_DEMANGLE_H)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_function_exists(process_vm_readv HAVE_PROCESS_VM_READV)
|
check_function_exists(process_vm_readv HAVE_PROCESS_VM_READV)
|
||||||
@ -147,7 +153,7 @@ add_executable(${MT} ${C_SRCS})
|
|||||||
target_link_libraries(${MT} ${LIB_ELF_LIBRARIES} ${LIB_PTHREAD} ${LIB_DL} ${LIB_RT} ${LIB_READLINE})
|
target_link_libraries(${MT} ${LIB_ELF_LIBRARIES} ${LIB_PTHREAD} ${LIB_DL} ${LIB_RT} ${LIB_READLINE})
|
||||||
if(LIB_BFD)
|
if(LIB_BFD)
|
||||||
target_compile_options(${MT} PRIVATE -DPACKAGE)
|
target_compile_options(${MT} PRIVATE -DPACKAGE)
|
||||||
target_link_libraries(${MT} ${LIB_BFD})
|
target_link_libraries(${MT} ${LIB_BFD} ${LIB_ZLIB_LIBRARIES} ${LIB_IBERTY})
|
||||||
endif()
|
endif()
|
||||||
target_compile_options(${MT} PUBLIC ${LIB_ELF_CFLAGS_OTHER})
|
target_compile_options(${MT} PUBLIC ${LIB_ELF_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user