From 62a60b4ea43a53a4d853a5ee0e8cf6697af43cde Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Mon, 13 Feb 2023 19:04:14 +0100 Subject: [PATCH] fix: link libquota on NetBSD to fix FTBFS (#4863) --- CMakeLists.txt | 5 +++++ libtransmission/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a54c49368..ac8a659d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -708,6 +708,11 @@ if(HAVE_LIBM) set(LIBM_LIBRARY m) endif() +check_library_exists(quota quotacursor_skipidtype "" HAVE_LIBQUOTA) +if(HAVE_LIBQUOTA) + set(LIBQUOTA_LIBRARY quota) +endif() + set(TR_NETWORK_LIBRARIES) if(WIN32) list(APPEND TR_NETWORK_LIBRARIES iphlpapi ws2_32) diff --git a/libtransmission/CMakeLists.txt b/libtransmission/CMakeLists.txt index 93dbe9b86..3620805b1 100644 --- a/libtransmission/CMakeLists.txt +++ b/libtransmission/CMakeLists.txt @@ -279,6 +279,7 @@ target_link_libraries(${TR_NAME} libb64::libb64 ${LIBINTL_LIBRARY} ${LIBM_LIBRARY} + ${LIBQUOTA_LIBRARY} ${TR_NETWORK_LIBRARIES} jsonsl utf8::cpp