Quick patch for when LIBUNWIND_LDFLAGS isn't set
This commit is contained in:
parent
7c9b24ca72
commit
32275cd679
@ -511,7 +511,6 @@ if(CPPTRACE_UNWIND_WITH_LIBUNWIND)
|
||||
if(LIBUNWIND)
|
||||
set(libunwind_FOUND TRUE)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT libunwind_FOUND)
|
||||
# message(FATAL_ERROR "Unable to locate libunwind")
|
||||
# Try to link with it if it's where it should be
|
||||
@ -519,11 +518,15 @@ if(CPPTRACE_UNWIND_WITH_LIBUNWIND)
|
||||
# up the find_library above.
|
||||
set(LIBUNWIND_LDFLAGS "-lunwind")
|
||||
endif()
|
||||
if(NOT LIBUNWIND_LDFLAGS)
|
||||
set(LIBUNWIND_LDFLAGS "${LIBUNWIND}")
|
||||
endif()
|
||||
target_compile_options(${target_name} PRIVATE ${LIBUNWIND_CFLAGS_OTHER})
|
||||
target_include_directories(${target_name} PRIVATE ${LIBUNWIND_INCLUDE_DIRS})
|
||||
target_link_libraries(${target_name} PRIVATE ${LIBUNWIND_LDFLAGS})
|
||||
target_compile_definitions(${target_name} PUBLIC CPPTRACE_UNWIND_WITH_LIBUNWIND UNW_LOCAL_ONLY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CPPTRACE_UNWIND_WITH_EXECINFO)
|
||||
if(NOT HAS_EXECINFO)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user