summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cea97fce..d14538d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -215,6 +215,18 @@ endif()
215# 215#
216################################################################################ 216################################################################################
217 217
218# toxcore_PKGCONFIG_LIBS is what's added to the Libs: line in toxcore.pc. It
219# needs to contain all the libraries a program using toxcore should link against
220# if it's statically linked. If it's dynamically linked, there is no need to
221# explicitly link against all the dependencies, but it doesn't harm much(*)
222# either.
223#
224# (*) It allows client code to use symbols from our dependencies without
225# explicitly linking against them.
226set(toxcore_PKGCONFIG_LIBS)
227# Requires: in pkg-config file.
228set(toxcore_PKGCONFIG_REQUIRES)
229
218# LAYER 1: Crypto core 230# LAYER 1: Crypto core
219# -------------------- 231# --------------------
220apidsl(toxcore/crypto_core.api.h) 232apidsl(toxcore/crypto_core.api.h)
@@ -227,7 +239,7 @@ include(CheckFunctionExists)
227check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO) 239check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO)
228check_function_exists(memset_s HAVE_MEMSET_S) 240check_function_exists(memset_s HAVE_MEMSET_S)
229set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${LIBSODIUM_LIBRARIES}) 241set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${LIBSODIUM_LIBRARIES})
230set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} libsodium) 242set(toxcore_PKGCONFIG_REQUIRES ${toxcore_PKGCONFIG_REQUIRES} libsodium)
231 243
232# LAYER 2: Basic networking 244# LAYER 2: Basic networking
233# ------------------------- 245# -------------------------
@@ -364,12 +376,12 @@ endif()
364 376
365if(RT_LIBRARIES) 377if(RT_LIBRARIES)
366 set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${RT_LIBRARIES}) 378 set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${RT_LIBRARIES})
367 set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lrt") 379 set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lrt)
368endif() 380endif()
369 381
370if(WIN32) 382if(WIN32)
371 set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ws2_32 iphlpapi) 383 set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ws2_32 iphlpapi)
372 set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} "-lws2_32 -liphlpapi") 384 set(toxcore_PKGCONFIG_LIBS ${toxcore_PKGCONFIG_LIBS} -lws2_32 -liphlpapi)
373endif() 385endif()
374 386
375################################################################################ 387################################################################################