Quick patch for when LIBUNWIND_LDFLAGS isn't set
This commit is contained in:
parent
7c9b24ca72
commit
32275cd679
@ -511,18 +511,21 @@ if(CPPTRACE_UNWIND_WITH_LIBUNWIND)
|
|||||||
if(LIBUNWIND)
|
if(LIBUNWIND)
|
||||||
set(libunwind_FOUND TRUE)
|
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
|
||||||
|
# This path can be entered if libunwind was installed via the system package manager, sometimes. I probably messed
|
||||||
|
# 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(NOT libunwind_FOUND)
|
|
||||||
# message(FATAL_ERROR "Unable to locate libunwind")
|
|
||||||
# Try to link with it if it's where it should be
|
|
||||||
# This path can be entered if libunwind was installed via the system package manager, sometimes. I probably messed
|
|
||||||
# up the find_library above.
|
|
||||||
set(LIBUNWIND_LDFLAGS "-lunwind")
|
|
||||||
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(CPPTRACE_UNWIND_WITH_EXECINFO)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user