sdl12-compat: cmake: don't use add_definitions.

From a2de2d6466928ffb813231d286b4b75e75322307 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 10 Jun 2021 21:51:28 -0400
Subject: [PATCH] cmake: don't use add_definitions.

Reference issue #85.
---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82c3017..d1309f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,7 @@ include("cmake/modules/FindSDL2.cmake")
 target_include_directories(SDL PRIVATE ${SDL2_INCLUDE_DIRS})
 
 if (CMAKE_C_COMPILER_ID MATCHES "Clang|GNU")
-  add_definitions("-Wall -Werror=declaration-after-statement")  # force these universally.
+  add_compile_options(-Wall -Werror=declaration-after-statement)  # force these universally.
 endif()
 
 # avoid DLL having 'lib' prefix with Windows MinGW builds