Commit Graph

11 Commits

Author SHA1 Message Date
Arthur Schreiber
768e185c54 Wrap path in quotes to support paths containing whitespace. 2016-01-09 02:43:03 +01:00
Dominique Leuenberger
5540d9db20 pkg-config: fix directory references in libgit2.pc
Before:
libdir=/usr//usr/lib64
includedir=/usr//usr/include

After:
libdir=/usr/lib64
includedir=/usr/include

(note the duplication of /usr in the before case)
2015-09-18 11:05:57 +02:00
Vicent Marti
6a5fb1f4cc pkg-config: Sort the different sections
Because of the fact that pkg-config is pants-on-head retarded and that
the Linux linker *requires* a static library to come before all its
dynamic dependencies in the link path, calling `pkg-config --libs
--static` was generating the wrong flags for linking.

Before this patch:

	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lcurl -lssh2
	-lrt -lgit2 -lssl -lcrypto -ldl -lz

After this patch:

	-Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/local/lib -lgit2 -lcurl
	-lssh2 -lrt -lssl -lcrypto -ldl -lz

By setting the "Libs" line before all other rules, we make sure that
`-lgit2` is the first library in the link path and that it gets its
symbols resolved with the libraries coming after it.

This fix (ab)uses an implementation detail in `pkg-config` (namely, that
flags are output as they are found on the file), but this detail seems
to be stable between releases and always gives a stable output.
2015-06-29 12:20:01 +02:00
Carlos Martín Nieto
1ecda61ec5 Set the correct dependencies in the pkg-config file
When linking statically, the including project needs to know what the
current library build depends on so they can link to it. Store this
information in the pkg-config file.

While here, remove claims that users need to link to zlib or libcrypto.
2013-10-23 13:46:31 +02:00
Veeti Paananen
9795a40f88 Use standard CMake variable names for installation paths
Rename INSTALL_INC and INSTALL_BIN to INCLUDE_INSTALL_DIR and
BIN_INSTALL_DIR, which are more commonly used. This is also
consistent with the variable for the library path which is
already LIB_INSTALL_DIR.
2012-10-20 02:56:35 +03:00
Michael Schubert
77ace82d7a libgit2.pc.in: also switch to LIB_INSTALL_DIR
b3237ac3 changed CMakeList.txt to use the more standard LIB_INSTALL_DIR
variable instead of INSTALL_LIB, but forgot to change libgit2.pc.in etc.
accordingly.
2012-07-16 13:30:23 +02:00
Carlos Martín Nieto
2327a7cc10 Create and install pkg-config file
This hasn't been working since the switch away from waf.

Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
2011-08-07 18:44:08 +02:00
Vicent Marti
9d1dcca229 Add proper version management
We now have proper sonames in Mac OS X and Linux, proper versioning on
the pkg-config file and proper DLL naming in Windows.

The version of the library is defined exclusively in 'src/git2.h'; the build scripts
read it from there automatically.

Signed-off-by: Vicent Marti <tanoku@gmail.com>
2011-02-07 10:35:58 +02:00
Ingmar Vanhassel
19af3949ca Add support for installing to a libdir other than 'lib'.
Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-02-01 15:00:10 -08:00
Steve Frécinaux
6f6a17db05 Fix pkgconfig file wrt last added dependencies
libz and libcrypto dependencies were added recently while libgit2.pc
did not get updated.

Signed-off-by: Steve Frécinaux <code@istique.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-30 16:50:45 -08:00
Steve Frécinaux
d7fbfe155f Add pkg-config support.
The libgit2.pc is generated on make install and installed, to allow
using the lib through the pkg-config helper.

Signed-off-by: Steve Frécinaux <code@istique.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-12-30 07:31:03 -08:00