cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode master
authorAndreas Schneider <asn@samba.org>
Fri, 17 Feb 2023 16:51:27 +0000 (17:51 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 17 Feb 2023 17:02:50 +0000 (18:02 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
tests/CMakeLists.txt

index 1262bed97e4dd7dd6402d78b3a7caf91d15f5a22..7f2f4ee22cec2fd9b48afbe3852b5c49bb3fb8d1 100644 (file)
@@ -1,5 +1,9 @@
 project(tests C)
 
+if (TARGET cmocka::cmocka)
+    set(CMOCKA_LIBRARY cmocka::cmocka)
+endif()
+
 set(TORTURE_LIBRARY torture)
 
 # A simple DNS server for testing