Externals: Add libLZMA.

This commit is contained in:
degasus
2019-12-30 15:07:54 +01:00
parent 4385afdb0a
commit 9fd03cda9d
156 changed files with 35414 additions and 0 deletions

View File

@ -588,6 +588,20 @@ else()
add_subdirectory(Externals/bzip2)
endif()
# macOS ships with liblzma.dylib but no headers, so check for the headers too
find_package(LibLZMA)
check_include_file(lzma.h HAVE_LZMA_H)
if(LIBLZMA_FOUND AND HAVE_LZMA_H)
message(STATUS "Using shared lzma")
else()
if(LIBLZMA_FOUND AND NOT HAVE_LZMA_H)
message(STATUS "Shared lzma found but lacks headers, falling back to the static library")
else()
message(STATUS "Shared lzma not found, falling back to the static library")
endif()
add_subdirectory(Externals/liblzma)
endif()
find_package(ZLIB)
if(ZLIB_FOUND)
message(STATUS "Using shared zlib")