X-Account-Key: account1
X-UIDL: 9e9f0f6333ab79cb494aa1d47f048d06
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:                                                                                 
Received: from lists.maptools.org (localhost [127.0.0.1])
	by mail.howardsilvan.com (Postfix) with ESMTPS id 3F447C42171
	for <faxguy@howardsilvan.com>; Mon, 22 Jun 2015 13:44:02 -0700 (PDT)
Received: from lists.maptools.org ([94.23.4.142] helo=lists.maptools.org)
	by fangorn.howardsilvan.com with SMTP (2.3.3); 22 Jun 2015 13:44:01 -0800
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id D553A35C03F;
	Mon, 22 Jun 2015 15:43:27 -0500 (EST)
Received: from auth.a.painless.aa.net.uk (auth.a.painless.aa.net.uk	[90.155.4.51])
	by lists.maptools.org (Postfix) with ESMTPS id EAEB235C03C
	for <tiff@lists.maptools.org>; Mon, 22 Jun 2015 15:37:10 -0500 (EST)
Received: from	f.b.6.5.7.b.a.e.d.3.f.7.2.2.5.2.d.b.d.d.0.6.8.0.0.b.8.0.1.0.0.2.ip6.arpa	([2001:8b0:860:ddbd:2522:7f3d:eab7:56bf] helo=ls25531.lan)
	by a.painless.aa.net.uk
	with esmtpsa (TLSv1:AES128-SHA:128)	(Exim 4.77) (envelope-from <rleigh@codelibre.net>)
	id 1Z78T6-00073X-G7	for tiff@lists.maptools.org;
	Mon, 22 Jun 2015 21:37:27 +0100
Message-ID: <5588721B.1090501@codelibre.net>
Date: Mon, 22 Jun 2015 21:37:47 +0100
From: Roger Leigh <rleigh@codelibre.net>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10;	rv:31.0)
 Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: tiff@lists.maptools.org
References:
	<AM3PR03MB1122F49AC36FC98E85AD019584A40@AM3PR03MB1122.eurprd03.prod.outlook.com>
In-Reply-To: 
 <AM3PR03MB1122F49AC36FC98E85AD019584A40@AM3PR03MB1122.eurprd03.prod.outlook
	.com>
Subject: Re: [Tiff] CMake support for building libtiff
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-Assp-ID: fangorn.howardsilvan.com m1-05841-12399
X-Assp-Session: 7F06EF0EA000 (mail 1)
X-Assp-Detected-RIP: 2001:8b0:860:ddbd:2522:7f3d:eab7:56bf, 90.155.4.51
X-Assp-Source-IP: 2001:8b0:860:ddbd:2522:7f3d:eab7:56bf
X-Assp-Envelope-From: tiff-bounces@lists.maptools.org
X-Assp-Intended-For: faxguy@howardsilvan.com
X-Assp-Version: 2.3.3(14029) on fangorn.howardsilvan.com
X-Assp-Server-TLS: yes
X-Assp-Delay: not delayed (whitelisted); 22 Jun 2015 13:44:02 -0800
X-Assp-Message-Score: -40 (KnownGoodHelo)
X-Assp-IP-Score: -40 (KnownGoodHelo)
X-Assp-Whitelisted: Yes (whitelistdb)
Return-Path: tiff-bounces@lists.maptools.org
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 19/06/2015 14:53, Rhys Thomas wrote:

Hi Rhys,

Thanks for taking the time to give this a try!

(BTW, your name seems familiar from WYLUG!  Though I've not been =

involved for several years after moving from York to Dundee.)

>  > 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:
>
>  > I'd be very interested in any feedback, particularly from Windows user=
s.
>
>  >   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.
>
> I have applied the previously attached patches to 4.0.4beta and tried a
> number of different configurations under Windows 7. On each occasion I
> did not change any of the settings available in CMake.
>
> On my main Windows 7 machine I have tried to build on Visual Studio 2008
> and 2012 (32 and 64 bit targeted on both, tried Debug and Release
> configurations) and have been unsuccessful in my attempts to build. The
> error messages seem to suggest that some header files are
> missing/inaccessible on my system (unistd.h being one of them). I have a
> lot of extra stuff set up in my Include and Library paths, including
> some parts of GnuWin32 which seems to be where the errors are coming
> from (zconf.h being one such source). Disabling Win32 file IO in CMake
> gets rid of a few of these errors.

I've just posted a new set of patches against 4.0.4.  If you could =

possibly retry with them, it might have cleared up some of the issues =

(I've fixed a few header/type-related bits).

> On a clean Visual Studio 2012 installation on another machine the
> results are much better: on all of the configurations that I tried
> (32/64 bit, Debug/Release) all but eight of the projects built
> successfully (is this the same number that you found? I did not comment
> out the lines that you suggested). I have not yet identified the
> projects that did not build correctly, however the output tiff library
> and dll files appear to have been generated. I have not yet used these
> output files in any of my applications. I don=92t have a clean Visual
> Studio 2008 installation to try.

I haven't exhaustively tested every combination.  It's on my list =

though--I've just been limited by time.  It took a good while just =

getting the basic build and tests working, so haven't tested (on =

Windows) with separate zlib/jpeg/jbig at this point.  I've tested the =

functionality on BSD/Linux/MacOS X to be sure it works with various =

combinations of no/some/all optional libraries being used.  One other =

area which might need tweaking is the detection of the Debug/Release =

version of the libtiff.dll when running tests in case it's not =

sufficiently flexible.

If the new patches don't help here it would certainly be useful to have =

more concrete details of exactly what you are linking aginst, how those =

libraries were built etc. so I can try to reproduce locally.  If they =

were built against a different version of the runtime that might cause =

problems? (I'm afraid I'm still a relative beginner to building on =

Windows since my native territory is Unix, so I'm still learning the ins =

and outs of the nastiness.)

> In my opinion I would prefer the option for setting the JPEG include and
> library paths to be in the default rather than the advanced view of
> CMake-Gui. Is this an option that other people are worried about?

We are currently using the standard find_package() cmake functionality =

which marks these as advanced by default, so the current behaviour =

matches that used by all other cmake-using packages.  However, it's =

certainly possible to remove the "advanced" setting with =

mark_as_advanced(CLEAR) if that is more generally desirable.  libtiff is =

certainly a bit of a special-case with the 8/12-bit jpeg support.


Regards,
Roger

-- =

Dr Roger Leigh -- Open Microscopy Environment
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/


