From 38b854705588ddc2d0cdd767645fcaf502d327b7 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Thu, 30 Mar 2023 21:03:16 -0500 Subject: [PATCH] CMake: Enable CMP0099 Allows INTERFACE_LINK_OPTIONS to propagate through private dependencies, required by MacOS framework builds of SDL2 --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fd3972ad2..d24daa79e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,10 @@ cmake_minimum_required(VERSION 3.13) cmake_policy(SET CMP0079 NEW) # let target_link_libraries() link to a target defined in a different directory cmake_policy(SET CMP0080 OLD) # allow using BundleUtilities at configure time +if (POLICY CMP0099) + cmake_policy(SET CMP0099 NEW) # Propagate INTERFACE_LINK_OPTIONS from private dependencies, used by MacOS framework builds of SDL +endif() + # Weird chicken-and-egg problem: We can't check the compiler before the project() call, but we have to set the policies before it. # So we do this in two steps: Set the policies if they exist, then error out afterwards if we end up being MSVC and they don't exist. if (POLICY CMP0117)