SDL_ttf: cmake: DEPRECATION property is available on CMake 3.17+

From 760844903a196c315e0f421cefbfb7c3748c76af Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 23 Jul 2022 17:28:28 +0200
Subject: [PATCH] cmake: DEPRECATION property is available on CMake 3.17+

---
 CMakeLists.txt | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bc75d70..a05ce56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -399,6 +399,9 @@ endif()
 add_library(SDL2::ttf INTERFACE IMPORTED GLOBAL)
 set_target_properties(SDL2::ttf PROPERTIES
     INTERFACE_LINK_LIBRARIES "SDL2_ttf"
-    DEPRECATION "Use SDL2_ttf::SDL2_ttf or SDL2_ttf::SDL2_ttf-static instead"
 )
-
+if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17")
+    set_target_properties(SDL2::ttf PROPERTIES
+        DEPRECATION "Use SDL2_ttf::SDL2_ttf or SDL2_ttf::SDL2_ttf-static instead"
+    )
+endif()