socket_wrapper/socket_wrapper-fix-cmocka-1.1.6+-support.patch

34 lines
874 B
Diff
Raw Normal View History

From 97fe09e583f6e2ef94623c872e0c56bcd8817303 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 17 Feb 2023 17:51:27 +0100
Subject: [PATCH] cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
---
tests/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 6c3aae9..3748461 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -7,6 +7,11 @@ include_directories(
${CMOCKA_INCLUDE_DIR}
)
+# Required for cmocka >= 1.1.6
+if (TARGET cmocka::cmocka)
+ set(CMOCKA_LIBRARY cmocka::cmocka)
+endif()
+
set(TORTURE_LIBRARY torture)
# RFC862 echo server
--
2.39.2