Increase minimum CMake version to 3.5; move CMP0048/CMP0063 settings to the top-level CMakeLists.txt file.

Ubuntu 16.04 has CMake 3.5, so we can target that as the minimum
version. Also, recent CMake versions (3.27+) have started printing
warnings if the minimum is less than 3.5.

CMake Deprecation Warning at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Also, remove CMAKE_MINIMUM_REQUIRED() from all subdirectories.
This commit is contained in:
David Korth 2024-02-20 19:23:06 -05:00
parent 46b533520b
commit 66c8afb410
8 changed files with 14 additions and 47 deletions

View File

@ -1,7 +1,17 @@
# RVT-H Tool
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
# CMP0048: Set VERSION variables based on the project version specified in PROJECT().
# Introduced in CMake 3.0.
CMAKE_POLICY(SET CMP0048 NEW)
PROJECT(rvthtool-base VERSION 1.1.1.1)
# CMP0063: Honor visibility properties for all target types,
# including static libraries and executables.
# Introduced in CMake 3.3.
CMAKE_POLICY(SET CMP0063 NEW)
SET(RVTHTOOL_VERSION 1.1.1.1)
PROJECT(rvthtool-base VERSION ${RVTHTOOL_VERSION})
# CMAKE_PROJECT_VERSION was introduced in 3.12.
IF(NOT CMAKE_PROJECT_VERSION OR NOT CMAKE_PROJECT_VERSION_MAJOR)

View File

@ -1,4 +1,3 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
PROJECT(src)
# Check for Large File Support.

View File

@ -1,11 +1,4 @@
# librvth: RVT-H Reader library
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(librvth LANGUAGES C CXX)
# Check for C library functions.

View File

@ -1,11 +1,4 @@
# libwiicrypto: Wii encryption library
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(libwiicrypto LANGUAGES C)
# Check for C library functions.

View File

@ -1,12 +1,5 @@
# Wii U NUS Resigning and Conversion tool
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(nusresign LANGUAGES C)
PROJECT(nusresign LANGUAGES C CXX)
# Create the Win32 manifest file.
IF(WIN32)

View File

@ -1,11 +1,4 @@
# RVT-H Tool Qt GUI frontend
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(qrvthtool LANGUAGES CXX)
# Main binary directory. Needed for git_version.h

View File

@ -1,11 +1,4 @@
# rvthtool command line tool
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(rvthtool LANGUAGES C CXX)
# Create the Win32 manifest file.

View File

@ -1,12 +1,5 @@
# WAD Resigning and Conversion tool
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_POLICY(SET CMP0048 NEW)
IF(POLICY CMP0063)
# CMake 3.3: Enable symbol visibility presets for all
# target types, including static libraries and executables.
CMAKE_POLICY(SET CMP0063 NEW)
ENDIF(POLICY CMP0063)
PROJECT(wadresign LANGUAGES CXX)
PROJECT(wadresign LANGUAGES C CXX)
# Create the Win32 manifest file.
IF(WIN32)