Commit Graph

15 Commits

Author SHA1 Message Date
Roland Kaufmann
ac042e426f Install header-only pkgconfig file to generic lib/
The previous version assumed that we had libraries, and thus always
installs the .pc file in the multi-arch library directory. However,
we now have modules which does not have a library, but whose header
files still need to be located. Since the lib/ directory is usually
in the pkgconfig search path, it is natural to put them there.
2013-10-17 09:39:59 +02:00
Roland Kaufmann
6deeb5dfa5 Support installation in a versioned directory
If the option USE_VERSIONED_DIR is set to ON (default is OFF), then
most files are installed in a ${suite}-${label}/ subdirectory
(e.g. header files go in "/usr/include/opm-2013.03/"). This enables
us to easily install backports of newer versions on systems which
have a system package for an older one, without getting conflicts.
2013-08-23 22:28:43 +02:00
Roland Kaufmann
3df0f06f45 Use OPM_MACROS_ROOT to locate build scripts
By using a separate variable for this we can easily grep for where
the build system depends on its own location, and also change the
policy regarding this later.

Note that there is no opm-macros module; this is a "psuedo"-module
which links to an additional one (currently, the one we're in)
2013-08-14 21:26:28 +02:00
Roland Kaufmann
1dd608358c Write cmdline in .pc file without abs paths
When passing libraries to gcc/ld, the search path and library name must
be specified separately. This is already done when writing a libtool .la
and should be done in the pkg-config .pc file too.
2013-03-22 22:27:14 +01:00
Roland Kaufmann
ae6e5314e3 Remove hardcoded project names and directories
Everything is now set through variables, which means that we can
change the name of the project by just altering the header.
2013-02-11 23:08:28 +01:00
Roland Kaufmann
097068f9c1 Move now generic templates into cmake/ directory
Templates can now be reused across projects. The output files are still
put in the root of the output tree because that is where the client
programs will look for them.
2013-02-11 23:06:39 +01:00
Roland Kaufmann
f883d52f0f Make template instantiatable for multiple projects
The name "opm-project" is replaced by the real name of the project.
2013-02-11 23:06:39 +01:00
Roland Kaufmann
2f20314ffb Pick up description from one place 2013-02-11 23:06:39 +01:00
Roland Kaufmann
6f3a7baccd Add standard variables/location hints
There is a convention that one can do `pkg-config --variable=includedir`
and have it return the path to the source files (even if that should
have been taken care of by options in --cflags).
2013-02-11 23:06:38 +01:00
Roland Kaufmann
39758ab13b Revert clever setting of version number in dune.module
dunecontrol will read the dune.module file first, before calling any
configuration files; thus it cannot be initialized from the script
but the version numbers must be hardcoded here and updated manually.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
ad4e9064f7 Write pkgconfig files as well as CMake
Note that using pkg-config is NOT recommended because of:

1. It doesn't know which language you are using, so language-specific
   options such as -std=c++11 or -std=c99 cannot be passed along. Yet,
   the build will corrupt if you don't get these correct.

2. It has no means of communicating which defines that should be set
   in config.h, effectively disabling them all, possibly leading to
   inconsistencies between the library and the executable.
2013-02-11 23:06:27 +01:00
Roland Kaufmann
7c1568311e Multi-arch support in writing config mode file 2013-02-11 22:38:02 +01:00
Roland Kaufmann
5ed1aa37f0 Move writing of config module to library routine 2013-02-11 22:38:02 +01:00
Roland Kaufmann
0e88d99c50 Write version file so user can specify lower bound
With the version file present, a user program can depend on a certain
version of the library.
2013-02-11 22:37:55 +01:00
Roland Kaufmann
9942dcc8d9 Install config mode CMake module at installation
find_package only searches for FindXxx-modules in the path specified by
CMAKE_MODULE_PATH; other paths are supposed to contain config-mode
modules (much like pkgconfig).

Generate the config-mode module in the installation directory using the
same template as is used for the one in the build directory, only
selectively swapping some directories in the relevant variables.
2013-02-11 22:37:55 +01:00