summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorFrancesco Borzì <borzifrancesco@gmail.com>2020-12-07 21:50:45 +0100
committerGitHub <noreply@github.com>2020-12-07 14:50:45 -0600
commitb1f108900d34281334ff6e70a9cc1344b3a05812 (patch)
tree5b21483dd36cc24fe08bcc1f1aa5a85e5404df04 /CMakeLists.txt
parentc5a35efd7b7b122a11121bbdad52a48c9aa07c02 (diff)
fix(CMake): Deprecation warning #3814
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3761e6ef4..76eea72697 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,17 +10,22 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
-# Set projectname (must be done AFTER setting configurationtypes)
-project(AzerothCore)
-
# Require a min version Cmake
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.8...3.19)
+
+# Fallback for using newer policies on CMake <3.12.
+if(${CMAKE_VERSION} VERSION_LESS 3.12)
+ cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
+endif()
message(STATUS "CMake version: ${CMAKE_VERSION}")
# CMake policies (can not be handled elsewhere)
cmake_policy(SET CMP0005 NEW)
+# Set projectname (must be done AFTER setting configurationtypes)
+project(AzerothCore VERSION 3.0.0 LANGUAGES CXX C)
+
# add this options before PROJECT keyword
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)