[various] Set cmake_policy versions (#3828)

Use of `FetchContent` with default policy settings has a warning starting with CMake 3.24. This opts those plugins into new behaviors for everything up through 3.24 to avoid those warnings.

The `VERSION` is used rather than an explicity policy setting since this is the approach recommended by CMake docs. For any policies that we aren't currently hitting, we would want new behavior by default in the future so that we don't accidentally depend on deprecated behavior.

See https://github.com/flutter/flutter/issues/116866
This commit is contained in:
stuartmorgan
2023-04-26 09:06:19 -07:00
committed by GitHub
parent a480c9f816
commit dbab0528ef
19 changed files with 39 additions and 8 deletions

View File

@ -1,5 +1,6 @@
## NEXT
## 0.2.1+6
* Sets a cmake_policy compatibility version to fix build warnings.
* Aligns Dart and Flutter SDK constraints.
## 0.2.1+5

View File

@ -2,7 +2,7 @@ name: camera_windows
description: A Flutter plugin for getting information about and controlling the camera on Windows.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.2.1+5
version: 0.2.1+6
environment:
sdk: ">=2.17.0 <4.0.0"

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14)
set(PROJECT_NAME "camera_windows")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.14...3.24)
# This value is used when generating builds using this plugin, so it must
# not be changed
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")

View File

@ -1,3 +1,7 @@
## 0.9.1+3
* Sets a cmake_policy compatibility version to fix build warnings.
## 0.9.1+2
* Clarifies explanation of endorsement in README.

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME "file_selector_linux")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.10...3.24)
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
list(APPEND PLUGIN_SOURCES

View File

@ -2,7 +2,7 @@ name: file_selector_linux
description: Liunx implementation of the file_selector plugin.
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_linux
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
version: 0.9.1+2
version: 0.9.1+3
environment:
sdk: ">=2.17.0 <4.0.0"

View File

@ -1,5 +1,6 @@
## NEXT
## 0.9.1+8
* Sets a cmake_policy compatibility version to fix build warnings.
* Updates minimum Flutter version to 3.3.
## 0.9.1+7

View File

@ -2,7 +2,7 @@ name: file_selector_windows
description: Windows implementation of the file_selector plugin.
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
version: 0.9.1+7
version: 0.9.1+8
environment:
sdk: ">=2.18.0 <4.0.0"

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14)
set(PROJECT_NAME "file_selector_windows")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.14...3.24)
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
list(APPEND PLUGIN_SOURCES

View File

@ -1,3 +1,7 @@
## 1.0.8
* Sets a cmake_policy compatibility version to fix build warnings.
## 1.0.7
* Clarifies explanation of endorsement in README.

View File

@ -2,7 +2,7 @@ name: local_auth_windows
description: Windows implementation of the local_auth plugin.
repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
version: 1.0.7
version: 1.0.8
environment:
sdk: ">=2.17.0 <4.0.0"

View File

@ -1,5 +1,6 @@
cmake_minimum_required(VERSION 3.15)
set(PROJECT_NAME "local_auth_windows")
cmake_policy(VERSION 3.15...3.24)
set(WIL_VERSION "1.0.220201.1")
set(CPPWINRT_VERSION "2.0.220418.1")
project(${PROJECT_NAME} LANGUAGES CXX)

View File

@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.14)
set(PROJECT_NAME "test_plugin")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.14...3.24)
# This value is used when generating builds using this plugin, so it must
# not be changed
set(PLUGIN_NAME "test_plugin_plugin")

View File

@ -1,3 +1,7 @@
## 3.0.5
* Sets a cmake_policy compatibility version to fix build warnings.
## 3.0.4
* Clarifies explanation of endorsement in README.

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME "url_launcher_linux")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.10...3.24)
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
list(APPEND PLUGIN_SOURCES

View File

@ -2,7 +2,7 @@ name: url_launcher_linux
description: Linux implementation of the url_launcher plugin.
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_linux
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 3.0.4
version: 3.0.5
environment:
sdk: ">=2.17.0 <4.0.0"

View File

@ -1,3 +1,7 @@
## 3.0.6
* Sets a cmake_policy compatibility version to fix build warnings.
## 3.0.5
* Clarifies explanation of endorsement in README.

View File

@ -2,7 +2,7 @@ name: url_launcher_windows
description: Windows implementation of the url_launcher plugin.
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_windows
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
version: 3.0.5
version: 3.0.6
environment:
sdk: ">=2.17.0 <4.0.0"

View File

@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME "url_launcher_windows")
project(${PROJECT_NAME} LANGUAGES CXX)
cmake_policy(VERSION 3.10...3.24)
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
list(APPEND PLUGIN_SOURCES