@ -17,6 +17,22 @@ find_path(LIBUNWIND_INCLUDE_DIR libunwind.h
)
)
find_library ( LIBUNWIND_LIBRARIES NAMES unwind )
find_library ( LIBUNWIND_LIBRARIES NAMES unwind )
if ( NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND" )
if ( CMAKE_COMPILER_IS_GNUCC )
set ( LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}" )
endif ( )
endif ( )
# s o m e v e r s i o n s o f l i b u n w i n d n e e d l i b l z m a , a n d w e d o n ' t u s e p k g - c o n f i g
# s o w e j u s t l o o k w h e t h e r l i b l z m a i s i n s t a l l e d , a n d a d d i t i f i t i s .
# I t m i g h t n o t b e a c t u a l l y n e e d e d , b u t d o e s n ' t h u r t i f i t i s n o t .
# W e d o n ' t n e e d a n y h e a d e r s , j u s t t h e l i b , a s i t ' s p r i v a t e l y n e e d e d .
message ( STATUS "looking for liblzma" )
find_library ( LIBLZMA_LIBRARIES lzma )
if ( NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND" )
message ( STATUS "liblzma found" )
set ( LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}" )
endif ( )
include ( FindPackageHandleStandardArgs )
include ( FindPackageHandleStandardArgs )
find_package_handle_standard_args ( Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES )
find_package_handle_standard_args ( Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES )