OPM/opm-core — pull request #31 by rolk (2012-09-21 11:47:25+00:00)
Title: Support for pkg-config

pkg-config is an attempt to provide a central database for discovery of available libraries.

This patch provides pkg-config support for discovering opm-core as a library. Samples and test-cases may then be compiled using simple one-liners like this:

g++ `pkg-config --cflags --libs opm-core` mytest.cxx

Unfortunately, pkg-config does not support prefix rewriting (discovering the location of the library based on the location of the .pc file) on Linux. Therefore, I have added two files: One which is geared towards being installed in the system directories, and one that picks up the location of the build itself.

If one sets the environment variable:

export PKG_CONFIG_PATH=/path/to/build/directory:$PKG_CONFIG_PATH

a local build of opm-core will be picked up from the specified directory, and this enables us to do development of the library without changing the configuration of dependent projects (they can use pkg-config always).