Update minimum required CMake version to 3.20 (#1253)
* Update the minimum CMake version to 3.20 Sets the cmake_minimum_required calls to version 3.20 and updates the README.md to point at the general CMake download page instead of a stale link. * Remove unnecessary cmake minimum version It was using an old 3.0 version and can be removed. * Additional updates to CMake 3.20, build scripts Updates the version and remove logic to find a CMake in 3rdParty. * Removing backup path to ninja path in the build_ninja_windows.cmd The backup path for finding ninja was coming from the Perforce depot which isn't available for o3de builds. * Removing reference to 3rdParty Android SDK 29 from the build and run unit test script The Android SDK is not part of the new 3rdParty system and users are expected to install the Android SDK on their own in order to build the engine for Android. * Update the get_python scripts and README No longer try to append a CMake path to LY_3RDPARTY_PATH, but do still support LY_CMAKE_PATH because there are still uses of it. Remove mention of an LY_3RDPARTY_PATH-relative CMake path from the README.md. * Removing LY_NINJA_PATH from the build_ninja_windows.cmd Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#
|
||||
|
||||
if(NOT PROJECT_NAME)
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(AutomatedTesting
|
||||
LANGUAGES C CXX
|
||||
VERSION 1.0.0.0
|
||||
|
||||
+2
-11
@@ -9,17 +9,8 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
# Cmake version 3.19 is the minimum version needed for all of Open 3D Engine's supported platforms
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
|
||||
# CMP0111 introduced in 3.19 has a bug that produces the policy to warn every time there is an
|
||||
# INTERFACE IMPORTED library. We use this type of libraries for handling 3rdParty. The rest of
|
||||
# the documentation states that INTERFACE IMPORTED libraries do not require to set locations, but
|
||||
# the policy still warns about it. Issue: https://gitlab.kitware.com/cmake/cmake/-/issues/21470
|
||||
# The issue was fixed in 3.19.1 so we just disable the policy for 3.19
|
||||
if(CMAKE_VERSION VERSION_EQUAL 3.19)
|
||||
cmake_policy(SET CMP0111 OLD)
|
||||
endif()
|
||||
# Cmake version 3.20 is the minimum version needed for all of Open 3D Engine's supported platforms
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
include(cmake/LySet.cmake)
|
||||
include(cmake/Version.cmake)
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
|
||||
ly_add_target(
|
||||
NAME AzAutoGen HEADERONLY
|
||||
NAMESPACE AZ
|
||||
|
||||
@@ -88,7 +88,7 @@ If you have the Git credential manager core or other credential helpers installe
|
||||
* Game Development with C++
|
||||
* MSVC v142 - VS 2019 C++ x64/x86
|
||||
* C++ 2019 redistributable update
|
||||
* CMake 3.19.1 minimum: [https://cmake.org/files/LatestRelease/cmake-3.19.1-win64-x64.msi](https://cmake.org/files/LatestRelease/cmake-3.19.1-win64-x64.msi)
|
||||
* CMake 3.20 minimum: [https://cmake.org/download/](https://cmake.org/download/)
|
||||
|
||||
#### Optional
|
||||
|
||||
@@ -105,7 +105,7 @@ If you have the Git credential manager core or other credential helpers installe
|
||||
|
||||
1. Install the following redistributables to the following:
|
||||
- Visual Studio and VC++ redistributable can be installed to any location
|
||||
- CMake can be installed to any location, as long as it's available in the system path, otherwise it can be installed to: `<3rdParty Path>\CMake\3.19.1`
|
||||
- CMake can be installed to any location, as long as it's available in the system path
|
||||
- WWise can be installed anywhere, but you will need to set an environment variable for CMake to detect it: `set LY_WWISE_INSTALL_PATH=<path to WWise>`
|
||||
|
||||
1. Navigate into the repo folder, then download the python runtime with this command
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# {END_LICENSE}
|
||||
|
||||
if(NOT PROJECT_NAME)
|
||||
cmake_minimum_required(VERSION 3.19)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(${Name}
|
||||
LANGUAGES C CXX
|
||||
VERSION 1.0.0.0
|
||||
|
||||
@@ -48,7 +48,7 @@ def verify_gradle(override_gradle_path=None):
|
||||
|
||||
|
||||
CMAKE_ARGUMENT_NAME = '--cmake-install-path'
|
||||
CMAKE_MIN_VERSION = LooseVersion('3.19.0')
|
||||
CMAKE_MIN_VERSION = LooseVersion('3.20.0')
|
||||
CMAKE_VERSION_REGEX = re.compile(r'cmake version (\d+.\d+.?\d*)')
|
||||
CMAKE_EXECUTABLE = 'cmake'
|
||||
|
||||
|
||||
@@ -32,18 +32,15 @@ IF !ERRORLEVEL!==0 (
|
||||
|
||||
cd /D %CMD_DIR%\..
|
||||
REM IF you update this logic, update it in scripts/build/Platform/Windows/env_windows.cmd
|
||||
REM If cmake is not found on path, try a known location, using LY_CMAKE_PATH as the first fallback
|
||||
REM If cmake is not found on path, try a known location at LY_CMAKE_PATH
|
||||
where /Q cmake
|
||||
IF NOT !ERRORLEVEL!==0 (
|
||||
IF "%LY_CMAKE_PATH%"=="" (
|
||||
IF "%LY_3RDPARTY_PATH%"=="" (
|
||||
ECHO ERROR: CMake was not found on the PATH and LY_3RDPARTY_PATH is not defined.
|
||||
ECHO Please ensure CMake is on the path or set LY_3RDPARTY_PATH or LY_CMAKE_PATH.
|
||||
EXIT /b 1
|
||||
)
|
||||
SET LY_CMAKE_PATH=!LY_3RDPARTY_PATH!\CMake\3.19.1\Windows\bin
|
||||
echo CMake was not found on the path, will use known location: !LY_CMAKE_PATH!
|
||||
ECHO ERROR: CMake was not found on the PATH and LY_CMAKE_PATH is not defined.
|
||||
ECHO Please ensure CMake is on the path or set LY_CMAKE_PATH.
|
||||
EXIT /b 1
|
||||
)
|
||||
|
||||
PATH !LY_CMAKE_PATH!;!PATH!
|
||||
where /Q cmake
|
||||
if NOT !ERRORLEVEL!==0 (
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# example:
|
||||
# cmake -DPAL_PLATFORM_NAME:string=Windows -DLY_3RDPARTY_PATH:string=%CMD_DIR% -P get_python.cmake
|
||||
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
if(LY_3RDPARTY_PATH)
|
||||
file(TO_CMAKE_PATH ${LY_3RDPARTY_PATH} LY_3RDPARTY_PATH)
|
||||
|
||||
+6
-16
@@ -42,31 +42,21 @@ then
|
||||
CMAKE_FOLDER_RELATIVE_TO_ROOT=CMake.app/Contents/bin
|
||||
else
|
||||
PAL=Linux
|
||||
CMAKE_FOLDER_RELATIVE_TO_ROOT=bin
|
||||
CMAKE_FOLDER_RELATIVE_TO_ROOT=bin
|
||||
fi
|
||||
|
||||
if ! [ -x "$(command -v cmake)" ]; then
|
||||
# Note that LY_3RDPARTY_PATH is only required here if you have no cmake in your PATH.
|
||||
if [ -z ${LY_CMAKE_PATH} ]; then
|
||||
if [ -z ${LY_3RDPARTY_PATH} ]; then
|
||||
echo "ERROR: Could not find cmake on the PATH and LY_3RDPARTY_PATH is not defined, cannot continue."
|
||||
echo "Please add cmake to your PATH, or define $LY_3RDPARTY_PATH"
|
||||
exit 1
|
||||
fi
|
||||
LY_CMAKE_PATH=$LY_3RDPARTY_PATH/CMake/3.19.1/$PAL/$CMAKE_FOLDER_RELATIVE_TO_ROOT
|
||||
# if you change the version number, change it also in:
|
||||
# scripts/build/Platform/Mac/env_mac.sh
|
||||
# and
|
||||
# scripts/build/Platform/Linux/env_linux.sh
|
||||
echo "ERROR: Could not find cmake on the PATH and LY_CMAKE_PATH is not defined, cannot continue."
|
||||
echo "Please add cmake to your PATH, or define LY_CMAKE_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
export PATH=$LY_CMAKE_PATH:$PATH
|
||||
if ! [ -x "$(command -v cmake)" ]; then
|
||||
echo "ERROR: Could not find cmake on the PATH or at the known location: $CMAKE_KNOWN_LOCATION"
|
||||
echo "ERROR: Could not find cmake on the PATH or at the known location: $LY_CMAKE_PATH"
|
||||
echo "Please add cmake to the environment PATH or place it at the above known location."
|
||||
exit 1
|
||||
else
|
||||
echo "CMake not found on path, but was found in the known 3rd Party location."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ IF NOT EXIST "%LY_3RDPARTY_PATH%" (
|
||||
GOTO :error
|
||||
)
|
||||
|
||||
IF NOT EXIST "%LY_ANDROID_SDK%" (
|
||||
SET LY_ANDROID_SDK=!LY_3RDPARTY_PATH!/android-sdk/platform-29
|
||||
)
|
||||
IF NOT EXIST "%LY_ANDROID_SDK%" (
|
||||
ECHO [ci_build] FAIL: LY_ANDROID_SDK=!LY_ANDROID_SDK!
|
||||
GOTO :error
|
||||
|
||||
@@ -13,27 +13,11 @@
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
if ! command -v cmake &> /dev/null; then
|
||||
if [[ -z $LY_CMAKE_PATH ]]; then LY_CMAKE_PATH=${LY_3RDPARTY_PATH}/CMake/3.19.1/Linux/bin; fi
|
||||
if [[ ! -d $LY_CMAKE_PATH ]]; then
|
||||
echo "[ci_build] CMake path not found"
|
||||
exit 1
|
||||
fi
|
||||
PATH=${LY_CMAKE_PATH}:${PATH}
|
||||
if ! command -v cmake &> /dev/null; then
|
||||
echo "[ci_build] CMake not found"
|
||||
exit 1
|
||||
fi
|
||||
echo "[ci_build] CMake not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v ninja &> /dev/null; then
|
||||
if [[ -z $LY_NINJA_PATH ]]; then LY_NINJA_PATH=${LY_3RDPARTY_PATH}/ninja/1.10.1/Linux; fi
|
||||
if [[ ! -d $LY_NINJA_PATH ]]; then
|
||||
echo "[ci_build] Ninja path not found"
|
||||
exit 1
|
||||
fi
|
||||
PATH=${LY_NINJA_PATH}:${PATH}
|
||||
if ! command -v ninja &> /dev/null; then
|
||||
echo "[ci_build] Ninja not found"
|
||||
exit 1
|
||||
fi
|
||||
echo "[ci_build] Ninja not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -13,14 +13,6 @@
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
if ! command -v cmake &> /dev/null; then
|
||||
if [[ -z $LY_CMAKE_PATH ]]; then LY_CMAKE_PATH=${LY_3RDPARTY_PATH}/CMake/3.19.1/Mac/CMake.app/Contents/bin; fi
|
||||
if [[ ! -d $LY_CMAKE_PATH ]]; then
|
||||
echo "[ci_build] CMake path not found"
|
||||
exit 1
|
||||
fi
|
||||
PATH=${LY_CMAKE_PATH}:${PATH}
|
||||
if ! command -v cmake &> /dev/null; then
|
||||
echo "[ci_build] CMake not found"
|
||||
exit 1
|
||||
fi
|
||||
echo "[ci_build] CMake not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -12,19 +12,10 @@ REM
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
IF NOT EXIST "%LY_NINJA_PATH%" (
|
||||
SET LY_NINJA_PATH=%LY_3RDPARTY_PATH%/ninja/1.10.1/Windows
|
||||
)
|
||||
IF NOT EXIST "%LY_NINJA_PATH%" (
|
||||
ECHO [ci_build] FAIL: LY_NINJA_PATH=%LY_NINJA_PATH%
|
||||
GOTO :error
|
||||
)
|
||||
PATH %LY_NINJA_PATH%;%PATH%
|
||||
|
||||
CALL "%~dp0build_windows.cmd"
|
||||
IF NOT %ERRORLEVEL%==0 GOTO :error
|
||||
|
||||
EXIT /b 0
|
||||
|
||||
:error
|
||||
EXIT /b 1
|
||||
EXIT /b 1
|
||||
|
||||
@@ -12,17 +12,8 @@ REM
|
||||
|
||||
where /Q cmake
|
||||
IF NOT %ERRORLEVEL%==0 (
|
||||
IF "%LY_CMAKE_PATH%"=="" (SET LY_CMAKE_PATH=%LY_3RDPARTY_PATH%/CMake/3.19.1/Windows/bin)
|
||||
IF NOT EXIST !LY_CMAKE_PATH! (
|
||||
ECHO [ci_build] CMake path not found
|
||||
GOTO :error
|
||||
)
|
||||
PATH !LY_CMAKE_PATH!;!PATH!
|
||||
where /Q cmake
|
||||
IF NOT !ERRORLEVEL!==0 (
|
||||
ECHO [ci_build] CMake not found
|
||||
GOTO :error
|
||||
)
|
||||
ECHO [ci_build] CMake not found
|
||||
GOTO :error
|
||||
)
|
||||
|
||||
EXIT /b 0
|
||||
|
||||
Reference in New Issue
Block a user