X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; q=dns; s=default; b=SQSe MabBSobHkHCtdxacdTwRIcxniC/Wcm8DSitCtx4kXmdN1ctqardvK/urT3c72vPU 3xnG2WiA/sW+f+hPgsVRnFZ06pCNYBDd8cwxBLTBvAS+AsfKp16SL9etTmB1uKCr 0gp9Q9pXOn/I1NU0PokXPtBqLV1POogFlLkcjz8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type; s=default; bh=V5sBuHAk5M 8RQXouZ3ihR2KTHyQ=; b=KiRUS2IaxQFbTYtRKhd6TXpLdrDeHFC6rh1A5COxAr vR9bzgoC2klsmSL/LI93MvbyUKSt7wboql2JCIm+nMFWuKn4bzkARymZgIYz6YWE IA1mgkaCiRYZgcgB5QqralOpKrnNGTQhay4TfsCZDzvSTF/Aq6VjYfLmyfxntSqt U= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*M:cygwin, quiring, Quiring, qt5 X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 25EF0C050907 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=none smtp.mailfrom=yselkowitz AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 25EF0C050907 Subject: Re: How to use CMake with cygwin/mingw toolchain? To: cygwin AT cygwin DOT com References: From: Yaakov Selkowitz Message-ID: Date: Fri, 20 Oct 2017 16:11:03 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AnONDva0b0sdM903vJ4BAbPQrgQ5R19HV" X-IsSubscribed: yes --AnONDva0b0sdM903vJ4BAbPQrgQ5R19HV Content-Type: multipart/mixed; boundary="JKwLbMiQFklTedOTaUdTfqhi4AJ5eoDhn"; protected-headers="v1" From: Yaakov Selkowitz To: cygwin AT cygwin DOT com Message-ID: Subject: Re: How to use CMake with cygwin/mingw toolchain? References: In-Reply-To: --JKwLbMiQFklTedOTaUdTfqhi4AJ5eoDhn Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: quoted-printable On 2017-10-20 07:50, Peter Quiring wrote: > What is the current process to use the mingw toolchain that is > included with cygwin? Treat it like any other cross-compiling scenario. > There use to be a -mno-cygwin option used with gcc. That was an ugly hack which never really worked correctly and which we happily rid ourselves years ago. > The mingw versions have x86_64-w64-mingw32- or i686-w64-mingw32- added > to their exe names. Currently I just use these directly but I want to > use cmake. >=20 > Cygwin also includes cmake. How would I configure it to use the mingw > toolset that is included with cygwin? You need to provide a number of options, see: https://github.com/cygwinports/cygport/blob/master/cygclass/cmake.cygclass#= L137 > I also see some Qt5 *.cmake modules included in the Qt5 libraries for min= gw. Those, like all my packages, are built with cygport. > Would it be possible to include a version of cmake built for mingw? No, but you can create a CMake toolchain file with all the options so that you don't have to specify them each time: https://cmake.org/Wiki/CMake_Cross_Compiling --=20 Yaakov --JKwLbMiQFklTedOTaUdTfqhi4AJ5eoDhn-- --AnONDva0b0sdM903vJ4BAbPQrgQ5R19HV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEARECADQWIQRFYAu5jKh4qpenARn/IK+aZu4flAUCWepmZxYceXNlbGtvd2l0 ekBjeWd3aW4uY29tAAoJEP8gr5pm7h+URBMAmweYcqrP65TFgs4boTxmFRrExPkh AKCFAfmiXElQzqKhnEiJpCv3kAD87Q== =T+50 -----END PGP SIGNATURE----- --AnONDva0b0sdM903vJ4BAbPQrgQ5R19HV--