mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Qt: pkg-config files?


From: Martin Lambers
Subject: Re: [Mingw-cross-env-list] Qt: pkg-config files?
Date: Wed, 05 Jan 2011 16:42:29 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

Hi Mark!

On 05/01/11 15:49, Mark Brand wrote:
>> Qt installs pkg-config files on GNU/Linux systems, but apparently not on
>> other systems such as Mingw. Would it be possible to force installation
>> of the pkg-config files in Mingw-cross-env?
>>
>> The required information seems to be already available in the
>> usr/i686-pc-mingw32/lib/Qt*.prl files, so maybe there's a simple switch
>> that forces installation of the pkg-config files?
>>
> Unfortunately, it's more complicated than setting a switch.
> 
> Qmake's unix makefile generator has the ability to write pkg-config
> files. However, the win32 generator is used for building Qt for Windows,
> including when cross-building on unix, and this generator does not make
> pkg-config files. See qmake/generators/ in the Qt source tree.
> 
> Arguably, the unix makefile generator should be used to generate
> makefiles when cross-building, but in practice the win32 makefile
> generator is a better fit and its makefiles intended for mingw32-make or
> msys-make work just fine with gmake on unix.
> 
> If you are so inclined, you might try porting the pkg-config writing
> feature to the win32 generator. It probably makes more sense than making
> the unix generator suitable for cross-building for mingw on unix.

Thanks for the explanation! I don't know much about the Qt build system
except that it looks scary to me :)

I currently use a workaround to extract the necessary information from
the .prl files. The following works for the QtOpenGL library with a
configure script that uses pkg-config:

MCEPFX=/path/to/mingw-cross-env/usr/i686-pc-mingw32

QTOPENGLLIBS="`grep QMAKE_PRL_LIBS "$MCEPFX"/lib/QtOpenGL.prl | sed -e
's/QMAKE_PRL_LIBS = //'`"

./configure --host=i686-pc-mingw32 \
  libqtopengl_CFLAGS="-I$MCEPFX/include/Qt -I$MCEPFX/include/QtCore
-I$MCEPFX/include/QtGui -I$MCEPFX/include/QtOpenGL" \
  libqtopengl_LIBS="-L$MCEPFX/lib -mwindows -lQtOpenGL $QTOPENGLLIBS"

Not nice, but it works for now.

Martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]