BuildSystemUsingPkgConfig - coin-or-foundation/tlc GitHub Wiki

Here is the current status on the attempt to modularize the build process of COIN-OR projects.

For previous discussions see the TLC maling list and the MeetingNotes080309.

For documentation, see https://projects.coin-or.org/BuildTools/wiki/pm-switch.

New macros in coin.m4

  • COIN_HAS_PKGCONFIG
  • COIN_MAIN_PACKAGEDIR
  • COIN_CHECK_PACKAGE
  • COIN_CHECK_PACKAGE_BLAS
  • COIN_CHECK_PACKAGE_LAPACK

See also https://projects.coin-or.org/BuildTools/browser/stable/0.6/coin.m4.

Changes to Installation Directories

  • pkgconfig files (.pc) go to <libdir>/pkgconfig

  • binaries of coin projects go to <bindir>

  • libraries of coin projects go to <libdir>/coin [was before]

  • header files of coin projects go to <includedir>/coin

  • data goes to <datadir>/coin/Data

  • documentation goes to <datadir>/coin/doc [was /doc/coin before]

  • libraries of coin build third party projects go to <libdir>/coin/ThirdParty [was not installed before]

  • headers of coin build third party projects go to <includedir>/coin/ThirdParty [was not installed before]

Defaults for the above variables are:

  • = build directory (the directory where configure is called)

  • <exec_prefix> =

  • = <exec_prefix>/bin

  • = <exec_prefix>/lib

  • = /include

  • = /share

Testing notes

Mac OS X

The example above was tested and works with Mac OS Leopard 10.6.1. The only modification is to add:

ADD_FFLAGS="-mmacosx-version-min=10.4"

to the configure command.

Windows with Msys (no cygwin) and Microsoft cl compiler

In order to use the new build system with msys/cl first go to

http://www.gtk.org/download-windows.html

and download

pkg-config-0.23-2.zip

glib_2.22.2-1_win32.zip

gettext-runtime-0.17-1.zip

Extract these files to msys\1.0\mingw\ and add:

set PKG_CONFIG_PATH=/usr/mingw/lib/pkgconfig/

to msys\1.0\msys.bat

See also http://www.cccp-project.net/wiki/index.php?title=Installing_MSYS-MinGW#pkg-config

Windows with Cygwin and Microsoft cl compiler

In order to use the new build system with cygwin/cl, start the cygwin setup and install pkg-config.

⚠️ **GitHub.com Fallback** ⚠️