From a307fcbf194d6f4fa6af8a00a17c3c31ef6008b8 Mon Sep 17 00:00:00 2001 From: selsta Date: Fri, 15 May 2026 17:18:36 +0200 Subject: [PATCH] cmake: enable linker-aware library de-duplication --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 12a758967..f89d6fd73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,14 @@ if (POLICY CMP0077) cmake_policy(SET CMP0077 NEW) endif() +# Let CMake de-duplicate link libraries according to linker/platform capabilities. +if (POLICY CMP0156) + cmake_policy(SET CMP0156 NEW) +endif() +if (POLICY CMP0179) + cmake_policy(SET CMP0179 NEW) +endif() + if (IOS) INCLUDE(CmakeLists_IOS.txt) endif()