From c8359c843b3f2a693e5c9ff47e1a9a0f288fa26d Mon Sep 17 00:00:00 2001 From: iphydf Date: Thu, 22 Feb 2018 17:29:42 +0000 Subject: Fix toxcore.pc generation. It's missing vpx and opus at the moment. --- CMakeLists.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index cea97fce..d14538d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,6 +215,18 @@ endif() # ################################################################################ +# toxcore_PKGCONFIG_LIBS is what's added to the Libs: line in toxcore.pc. It +# needs to contain all the libraries a program using toxcore should link against +# if it's statically linked. If it's dynamically linked, there is no need to +# explicitly link against all the dependencies, but it doesn't harm much(*) +# either. +# +# (*) It allows client code to use symbols from our dependencies without +# explicitly linking against them. +set(toxcore_PKGCONFIG_LIBS) +# Requires: in pkg-config file. +set(toxcore_PKGCONFIG_REQUIRES) + # LAYER 1: Crypto core # -------------------- apidsl(toxcore/crypto_core.api.h) @@ -227,7 +239,7 @@ include(CheckFunctionExists) check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO) check_function_exists(memset_s HAVE_MEMSET_S) set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${LIBSODIUM_LIBRARIES}) -set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} libsodium) +set(toxcore_PKGCONFIG_REQUIRES ${toxcore_PKGCONFIG_REQUIRES} libsodium) # LAYER 2: Basic networking # ------------------------- @@ -364,12 +376,12 @@ endif() if(RT_LIBRARIES) set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${RT_LIBRARIES}) - set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lrt") + set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lrt) endif() if(WIN32) set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ws2_32 iphlpapi) - set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lws2_32 -liphlpapi") + set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lws2_32 -liphlpapi) endif() ################################################################################ -- cgit v1.2.3