From 857316ff001b2a8dbbdc5996944d08a6d38c87ab Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Sat, 14 Feb 2026 15:17:48 +0000 Subject: [PATCH] Add cmake_policy(SET CMP0074 NEW) # Use _ROOT in find_package Signed-off-by: Matt Liberty --- CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f41fcac0..64c33cf7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,13 +23,20 @@ # This notice may not be removed or altered from any source distribution. cmake_minimum_required (VERSION 3.10) -if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) -# Use standard target names -cmake_policy(SET CMP0078 NEW) + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) + # Use _ROOT in find_package + cmake_policy(SET CMP0074 NEW) endif() + +if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.13) + # Use standard target names + cmake_policy(SET CMP0078 NEW) +endif() + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.14) -# Allows SWIG_MODULE_NAME to be set -cmake_policy(SET CMP0086 NEW) + # Allows SWIG_MODULE_NAME to be set + cmake_policy(SET CMP0086 NEW) endif() project(STA VERSION 2.7.0