AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2021.03.06 22:15 "[Tiff] Libdeflate not found ?", by Miguel Medalha
2021.03.06 22:31 "Re: [Tiff] Libdeflate not found ?", by Roger Leigh
2021.03.06 22:59 "Re: [Tiff] Libdeflate not found ?", by Miguel Medalha
2021.03.06 23:17 "Re: [Tiff] Libdeflate not found ?", by Miguel Medalha
2021.03.07 14:34 "Re: [Tiff] Libdeflate not found ?", by Roger Leigh
2021.03.07 15:44 "Re: [Tiff] Libdeflate not found ?", by Miguel Medalha
2021.03.07 15:48 "Re: [Tiff] Libdeflate not found ?", by Roger Leigh

2021.03.06 22:31 "Re: [Tiff] Libdeflate not found ?", by Roger Leigh

After the latest changes in the main CMakeLists.txt, libdeflate is no longer found automatically:

-- Could NOT find Deflate (missing: Deflate_LIBRARY)

Even if specifying the library's location with '-DDEFLATE_LIBRARY:FILEPATH=' it is still not found, CMake gives the same warning, as well as:

Manually-specified variables were not used by the project:
  DEFLATE_INCLUDE_DIR
  DEFLATE_LIBRARY

Now if we modify the command line to the form '-DDeflate_LIBRARY:FILEPATH= the library is found. This goes against the practice with all other libraries, which are specified in an ALL UPPERCASE format.

Was this change on purpose and, in the affirmative, why is the format in this case going against all other cases?

Regarding the naming and the overall rationale for the change, please see the MR description and discussion comments on https://gitlab.com/libtiff/libtiff/-/merge_requests/224. The main aim here is to take the custom logic we’ve written to match the Autotools build, and to turn it into proper CMake Find modules with all the expected behaviour provided by find_package that one would expect, from the detection of debug and release library variants, to the semantics of the include and library finding, version detection, to result variables, and imported targets.

If you haven’t done so already, I would suggest deleting CMakeCache.txt and re-running CMake to check it discovers libdeflate properly. If it doesn’t, maybe there’s some additional portability work required. It is not expected that there should be any change here.

If libdeflate isn’t on a standard search path, you might need to use CMAKE_PREFIX_PATH to specify where to search (used by find_path, find_library etc).

If it’s still not working after retrying after deleting the cache, please could you attach a transcript of the cmake run, the CMakeCache.txt, CMakeOutput.txt, CMakeError.txt and some details about where libdeflate is installed on your system.

Kind regards,

Roger