conor42 / fast-lzma2

Fast LZMA2 Library
BSD 3-Clause "New" or "Revised" License
293 stars 22 forks source link

How to integrate into LibTIFF which checks existence of lzma.h #3

Closed ghost closed 6 years ago

ghost commented 6 years ago

I am trying to integrate LZMA2 functionality into LibTIFF (https://gitlab.com/libtiff/libtiff) using CMake. Without it LibTIFF will complain when running cmake:

-- LZMA2 support: ON (requested) FALSE (availability)

The CMakeLists.txt of LibTIFF tests existence of LZMA2 library using CMake's own script in Modules\FindLibLZMA.cmake. This file tries to check the existence of lzma.h to decide the include directory:

find_path(LIBLZMA_INCLUDE_DIR lzma.h )
find_library(LIBLZMA_LIBRARY NAMES lzma liblzma)

But I could not find lzma.h anywhere in the downloaded source package from here. Also the lzma.lib and liblzma.lib do not exist either in output folder of fast-lzma2 after I successfully built it, which are to be linked to LibTIFF. So how to integrate Fast LZMA2 into LibTIFF using CMake? Thanks.

My environment:

ghost commented 6 years ago

It turns out that I should use another library for LZMA2: XZ Utils. So please close this issue since it's solved.