#66 pc file for MinGW

1.11.0
closed
Nigel Stewart
None
4
2015-01-24
2014-06-24
L Michaels
No

Downloaded and built glew 1.10.0 on MinGW using msys. It builds nicely on MinGW. I didn't notice any errors. I am using pkg-config (actually pkgconf) when I build other applications. When building applications that used glew's .pc file, I noticed the applications weren't finding the library. They were also looking for a .pc file for glu which currently doesn't exist (since libglu32.a came with mingw and the installation does not include .pc files).

So, I made a few modifications to the makefile and glew.pc.in to better accomodate non-POSIX systems that are also using pkg-config. Am attaching the patch in case it might prove useful to someone else.

I used $(NAME) to set the library name (@libname@) instead of hard-coding to GLEW. NAME seems to be set properly in the Makefile.* files in the config directory. For instance, with MinGW it's set to glew32. The variable appears to be a better indicator of the actual library name for various platforms than just using GLEW for every case.

I build my applications in a destination directory (typically DESTDIR) and install to a prefix directory. Setting GLEW_DEST works for installing to the proper directory. However, if my destination directory for creating my package isn't the same as the directory where it will be installed (PREFIX), the .pc files have the wrong prefix location. So, I added GLEW_PREFIX for the prefix only (install directory).

I also added a flag which can be used to optionally ignore adding glu as a required package for the .pc files.

Wanted to add my thanks to the GLEW developers for creating a useful library and making sure it ports well to non-POSIX platforms like Windows.

1 Attachments

Discussion

  • Nigel Stewart
    Nigel Stewart
    2014-07-13

    Looks reasonable, thanks for the patch.

     
  • Nigel Stewart
    Nigel Stewart
    2014-07-13

    • status: open --> accepted
    • assigned_to: Nigel Stewart
    • Group: Misc --> 1.10.1
    • Priority: 1 --> 4
     
  • Nigel Stewart
    Nigel Stewart
    2014-07-13

    • status: accepted --> pending
     
  • Nigel Stewart
    Nigel Stewart
    2014-08-12

    • Group: 1.10.1 --> 1.11.0
     
  • Nigel Stewart
    Nigel Stewart
    2015-01-24

    • Status: pending --> closed
     


Anonymous


Cancel   Add attachments