summaryrefslogtreecommitdiffstats
path: root/project/cmake/scripts/common/GeneratorSetup.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /project/cmake/scripts/common/GeneratorSetup.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'project/cmake/scripts/common/GeneratorSetup.cmake')
-rw-r--r--project/cmake/scripts/common/GeneratorSetup.cmake49
1 files changed, 0 insertions, 49 deletions
diff --git a/project/cmake/scripts/common/GeneratorSetup.cmake b/project/cmake/scripts/common/GeneratorSetup.cmake
deleted file mode 100644
index 304b504..0000000
--- a/project/cmake/scripts/common/GeneratorSetup.cmake
+++ /dev/null
@@ -1,49 +0,0 @@
1# Configure single-/multiconfiguration generators and variables
2#
3# CORE_BUILD_CONFIG that is set to
4# - CMAKE_BUILD_TYPE for single configuration generators such as make, nmake
5# - a variable that expands on build time to the current configuration for
6# multi configuration generators such as VS or Xcode
7if(CMAKE_CONFIGURATION_TYPES)
8 if(CMAKE_BUILD_TYPE)
9 message(FATAL_ERROR "CMAKE_BUILD_TYPE must not be defined for multi-configuration generators")
10 endif()
11 set(CORE_BUILD_CONFIG ${CMAKE_CFG_INTDIR})
12 message(STATUS "Generator: Multi-configuration (${CMAKE_GENERATOR})")
13else()
14 if(CMAKE_BUILD_TYPE)
15 set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}
16 CACHE STRING "Choose build type (${CMAKE_BUILD_TYPES})" FORCE)
17 else()
18 # Set default
19 set(CMAKE_BUILD_TYPE Release
20 CACHE STRING "Choose build type (${CMAKE_BUILD_TYPES})" FORCE)
21 endif()
22 set(CORE_BUILD_CONFIG ${CMAKE_BUILD_TYPE})
23 message(STATUS "Generator: Single-configuration: ${CMAKE_BUILD_TYPE} (${CMAKE_GENERATOR})")
24endif()
25
26# Print CMake version
27message(STATUS "CMake Version: ${CMAKE_VERSION}")
28
29# Deal with CMake special cases
30if(CMAKE_VERSION VERSION_EQUAL 3.5.1)
31 message(WARNING "CMake 3.5.1 introduced a crash during configuration. "
32 "Please consider upgrading to 3.5.2 (cmake.org/Bug/view.php?id=16044)")
33endif()
34
35# Darwin needs CMake 3.4
36if(APPLE AND CMAKE_VERSION VERSION_LESS 3.4)
37 message(WARNING "Build on Darwin requires CMake 3.4 or later (tdb library support) "
38 "or the usage of the patched version in depends.")
39endif()
40
41# Windows needs CMake 3.6 (VS_STARTUP_PROJECT)
42if(WIN32 AND CMAKE_VERSION VERSION_LESS 3.6)
43 message(FATAL_ERROR "Build on Windows needs CMake 3.6 or later")
44endif()
45
46# Ninja needs CMake 3.2 due to ExternalProject BUILD_BYPRODUCTS usage
47if(CMAKE_GENERATOR STREQUAL Ninja AND CMAKE_VERSION VERSION_LESS 3.2)
48 message(FATAL_ERROR "Generator: Ninja requires CMake 3.2 or later")
49endif()