pkg-config .pc files: added .private versions of Libs and Required

To prevent top-level linking of all libraries.

Problem: ```pkg-config --libs toxcore``` returns all libraries that are
required by all libtox*.so libraries. This is wrong because for a
dynamically linked executable only top-level libraries need to be
supplied. ```pkg-config --libs --static toxcore``` should return all
libraries for the statically linked executable.

For example, the ToxBot https://github.com/JFreegman/ToxBot executable
uses pkg-config and is linked with the opus library, which is wrong.

Based on #533.
This commit is contained in:
Yuri 2017-04-02 22:57:40 -07:00 committed by iphydf
parent f4ba43c81b
commit 1e1efec34a
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9

View File

@ -4,7 +4,8 @@ includedir=${prefix}/include
Name: toxcore
Description: Tox protocol library
Requires: @toxcore_PKGCONFIG_REQUIRES@
Requires.private: @toxcore_PKGCONFIG_REQUIRES@
Version: @PROJECT_VERSION@
Libs: -L${libdir} -ltoxcore @toxcore_PKGCONFIG_LIBS@
Libs: -L${libdir} -ltoxcore
Libs.private: @toxcore_PKGCONFIG_LIBS@
Cflags: -I${includedir}