Fix toxcore.pc generation.

It's missing vpx and opus at the moment.
This commit is contained in:
iphydf 2018-02-22 17:29:42 +00:00
parent d7471482d1
commit c8359c843b
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 15 additions and 15 deletions

View File

@ -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()
################################################################################

View File

@ -39,18 +39,6 @@ function(add_module lib)
add_library(${lib}_static STATIC ${ARGN})
set_target_properties(${lib}_static PROPERTIES OUTPUT_NAME ${lib})
endif()
# ${lib}_PKGCONFIG_LIBS is what's added to the Libs: line in ${lib}.pc. It
# needs to contain all the libraries a program using ${lib} 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(${lib}_PKGCONFIG_LIBS PARENT_SCOPE)
# Requires: in pkg-config file.
set(${lib}_PKGCONFIG_REQUIRES PARENT_SCOPE)
endfunction()
function(install_module lib)