[CMake] pkg-config at Windows Command Prompt

Andreas Pakulat apaku at gmx.de
Thu Sep 27 17:02:49 EDT 2007


On 27.09.07 16:12:19, Brandon Van Every wrote:
> On 9/27/07, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
> > On 2007-09-27 20:10+0200 Hendrik Sattler wrote:
> >
> > > Am Donnerstag 27 September 2007 schrieb Félix C. Morency:
> > >> The use of
> > >> pkgconfig is prohibited, just like shell scripts and env. variables. The
> > >> solution has to be as portable as it can be (win32, linux, macosx, etc.)
> > >
> > > pkgconfig _is_ portable. It works on all the mentioned platforms, AFAIK.
> >
> > To reinforce Hendrik's point, http://pkg-config.freedesktop.org/wiki/ has the
> > following to say:
> >
> > "pkg-config works on multiple platforms: Linux and other UNIX-like operating
> > systems, Mac OS X and Windows. It does not require anything but a reasonably
> > well working C compiler and a C library, but can use an installed glib if
> > that is present. (A copy of glib 1.2.8 is shipped together with pkg-config
> > and this is sufficient for pkg-config to compile and work properly.)"
> 
> If you look at the current source release, you will see that it is an
> Autoconf build.  There is no other build available.  On Windows that
> presupposes the use of a Cygwin or MSYS shell to build pkgconfig.
> README.win32 implies that if you build with MSYS, it's supposed to
> work with MSVC also.  But how strong is this guarantee that it's
> "supposed to" work?  There are no Windows binaries of pkg-config
> available on the website.  Googling around, I don't see any kind of
> self-contained pkg-config.exe for use on the Windows Command Prompt.
> I do see some .exe's that are part of Cygwin or MSYS toolchains.
> 
> Questions:
> 
> 1) does pkg-config.exe work from the Windows Command Prompt,
> independent of any MSYS shell environment that was used to build it?
> i.e. is it really "native" ?

AFAIK no, especially (AFAIK) it uses the same paths as under unix
(including unix path separators).

> 2) given the build constraints and the lack of obvious deployed
> binaries, is anyone actually making production use of it in
> conjunction with MSVC?  from the Command Prompt?

No, in fact the other way around. KDE4/win32 completely ignores
pkgconfig on win32 in its CMake FindXXX modules (its used extensively on
*nix and also MacOS)

> To a Windows native developer this tool smells bad.

I'm not a real win32 developer (just doing my part in porting a kde4 app
to win32) and it smells to me as bad as it smells to you ;)

Andreas

-- 
Are you making all this up as you go along?


More information about the CMake mailing list