2015.06.16 14:39 "[Tiff] CMake support for building libtiff", by Roger Leigh

2015.06.18 22:08 "Re: [Tiff] CMake support for building libtiff", by Roger Leigh

On 17/06/2015 22:38, Roger Leigh wrote:

On 16/06/2015 14:39, Roger Leigh wrote:

Would there be any interest in having support for building libtiff with CMake? This would allow for easier building on Windows and other platforms since it can generate build files for a whole host of different build tools and IDEs. For example, on Windows it generates project files for specific visual studio versions. On Unix it generates standard Makefiles. It also allows seamless integration of libtiff into libtiff-using projects (embedded directly or downloaded and build as a "superbuild"), and is quite a bit simpler to manage and use than the autotools (I switched after 15 years of autotools use).

I'm happy to do the work and submit this for inclusion. I just wanted to check if this was something which was of interest for others as well, and which wasn't totally objectionable to the maintainers.

Thanks all for the responses. I'll do this over the next few days. [It's not just for the sake of it; I need the support for a work project, in particular better Windows support.]

Just to give you an idea of what this will look like, I've attached the fruits of my days' labour, made against the 4.0.4 beta release. This is a conversion of

To try out:

I have now completed the conversion and I have attached a set of patches to add CMake support (against the 4.0.4 beta release). This has been tested on the following platforms:

Note that I converted the shell-based testcases to use CMake natively. This means you can run all the unit tests on Windows for the first time (and they all pass).

Caveat: Visual Studio 2013 and earlier don't provide snprintf(3). libtiff builds but the tests and tools do not all build; unless there's a workaround, I'll need to selectively disable building of the tools and tests when using these versions.

I'd be very interested in any feedback, particularly from Windows users.

  I'll follow up with a patch to disable the non-buildable components

tomorrow; you can just comment out the test/tools/contrib directories in the top-level CMakeLists.txt in the interim.

Regards,
Roger