From 7c7072ff7c16e3cf2077934d84df0a3adb18159d Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Thu, 7 Jul 2022 14:55:33 +0800 Subject: [PATCH] build(CMakeLists): dynamic link to libcap by default This is a only exception while all other libraries are dynamically linked. The "TODO" does not make any sense as libcap provides both dynamic and static libraries. There is not reason to explain why it needs to be statically linked 'especially' as dynamic linking works very well. Then just make it dynamically-linked by default, which also matches the behaviour on autotools. Compiled and tested on aarch64, no errors found. Signed-off-by: Tianling Shen --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7d7ccc7..868d48d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,8 +238,7 @@ if(N2N_OPTION_USE_ZSTD) endif(N2N_OPTION_USE_ZSTD) if(N2N_OPTION_USE_CAPLIB) - # TODO: this is a static library, shouldnt we have a generic one? - target_link_libraries(edge cap.a) + target_link_libraries(edge cap) endif(N2N_OPTION_USE_CAPLIB) if(N2N_OPTION_USE_PORTMAPPING)