Re: tiff "broken" after switch from autotools to cmake

From: Baptiste Daroussin <bapt_at_freebsd.org>
Date: Wed, 04 Dec 2024 09:24:23 UTC
On Wed 04 Dec 10:16, Baptiste Daroussin wrote:
> Hello,
> 
> With the upgrade to 4.7.0 of tiff, we have switch from autotools to cmake
> system build system.
> 
> We are the only non windows platform using the cmake build system apparently
> and the reason for the switch was not exposed in the build log, so I don't know
> why we did it...
> 
> One of the result if the switch is it installs some new lib/cmake/* files. and
> interresting fact it breaks FindTIFF.cmake provided by cmake-core.
> 
> Checking elswhere I can see noone is providing those lib/cmake files.
> 
> What is actually broken: FindTiff.cmake uses the lib/cmake package if it finds
> it otherwise do some regular path checking.
> 
> One of the feature that is not implemented by lib/cmake things provided by the
> tiff packages is the Optional COMPONENTS CXX.
> 
> I know nothing about libtiff or cmake, but my understanding is we should either
> fix the lib/cmake thing to it provides the CXX components (imho thise should be
> done upstream) or not provide at all the lib/cmake files for tiff until the
> upstream have fixed them.
> 
> My second question is why did we switch to cmake building in the first place ?
> Looking at the patch that were needed to be provided it is clearly not a first
> class citizen to build tiff on unix like.
> 
> Best regards,
> Bapt
> 

Self replying, I figured out alpine is doing the same and is the same way.

A simple test for the brokenness:
find_package(TIFF REQUIRED COMPONENTS CXX)

is does not work with the provide cmake files.

Best regards,
Bapt