summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2021-04-05 16:24:07 +0200
committerUwe Klotz <uklotz@mixxx.org>2021-04-05 16:28:34 +0200
commit858f7ff83483e2e67363d7862e8700c9e781e6ae (patch)
tree88d9dda94d3e591649e866e87bdcc4f1356beb87
parent40db30b6f17bef97d853c01c831fb61ec9bd358e (diff)
Reorder cmake_policy() before project()
Some of them might affect how project() works. Additional changes: - Require CMake minimum version 3.16 instead of 3.16.0 - Reorder list by CMP numbers - Add documentation for CMP0069
-rw-r--r--CMakeLists.txt41
1 files changed, 22 insertions, 19 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 33a0aa636a..b7e12ef7df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,22 +1,4 @@
-cmake_minimum_required(VERSION 3.16.0)
-project(mixxx VERSION 2.3.0)
-set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org")
-set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.")
-
-# Used for force control of color output
-set(BUILD_COLORS "auto" CACHE STRING "Try to use colors auto/always/no")
-# Option to disable symlinks
-set(USE_SYMLINKS ON CACHE BOOL "Use symlinks in build directory when possible")
-
-# Support new IN_LIST if() operator
-if(POLICY CMP0057)
- cmake_policy(SET CMP0057 NEW)
-endif()
-
-# Let AUTOMOC and AUTOUIC process GENERATED files
-if(POLICY CMP0071)
- cmake_policy(SET CMP0071 NEW)
-endif()
+cmake_minimum_required(VERSION 3.16)
# CMAKE_CXX_COMPILER_ID: Distinguish between "AppleClang" and "Clang"
if(POLICY CMP0025)
@@ -28,10 +10,31 @@ if(POLICY CMP0042)
cmake_policy(SET CMP0042 NEW)
endif()
+# Support new IN_LIST if() operator
+if(POLICY CMP0057)
+ cmake_policy(SET CMP0057 NEW)
+endif()
+
+# Enforce interprocedural optimization
if(POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
endif()
+# Let AUTOMOC and AUTOUIC process GENERATED files
+if(POLICY CMP0071)
+ cmake_policy(SET CMP0071 NEW)
+endif()
+
+project(mixxx VERSION 2.3.0)
+
+set(CMAKE_PROJECT_HOMEPAGE_URL "https://www.mixxx.org")
+set(CMAKE_PROJECT_DESCRIPTION "Mixxx is Free DJ software that gives you everything you need to perform live mixes.")
+
+# Used for force control of color output
+set(BUILD_COLORS "auto" CACHE STRING "Try to use colors auto/always/no")
+# Option to disable symlinks
+set(USE_SYMLINKS ON CACHE BOOL "Use symlinks in build directory when possible")
+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
include(CMakeDependentOption)
include(CheckSymbolExists)