From ee92794751e8ce883a4df211c7fe6c09efcdf7c7 Mon Sep 17 00:00:00 2001
From: Linda Lapinlampi <linda@lindalap.fi>
Date: Tue, 10 Aug 2021 10:52:04 +0000
Subject: [PATCH 3/3] core: Suppress CMake CMP0028 warnings (again)

For some reason, I assumed I didn't need to reintroduce CMP0028 for
CMake versions < 3.12. I believe I misread the documentation, although I
was aware of this policy being located lower in this file.

Partially reverts commit d6ec9cc.

See: #3824
---
 src/core/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 6b00c39c..7867cf90 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -161,6 +161,11 @@ include("versiondefs.cmake")
 configure_file(versiondefs.h.in versiondefs.h)
 set(HEADER_FILES "${HEADER_FILES}" versiondefs.h)
 
+# Suppress warnings for CMake < 3.12
+if (POLICY CMP0028)
+	cmake_policy(SET CMP0028 NEW)
+endif()
+
 add_executable(doomseeker
 	${Doomseeker_SOURCE_DIR}/media/resources.qrc
 	${doomseekerUI}
-- 
2.32.0.rc2

