Skip to content

Commit dbab052

Browse files
[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 flutter/flutter#116866
1 parent a480c9f commit dbab052

File tree

19 files changed

+39
-8
lines changed

19 files changed

+39
-8
lines changed

packages/camera/camera_windows/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.2.1+6
22

3+
* Sets a cmake_policy compatibility version to fix build warnings.
34
* Aligns Dart and Flutter SDK constraints.
45

56
## 0.2.1+5

packages/camera/camera_windows/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: camera_windows
22
description: A Flutter plugin for getting information about and controlling the camera on Windows.
33
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
5-
version: 0.2.1+5
5+
version: 0.2.1+6
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

packages/camera/camera_windows/windows/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14)
22
set(PROJECT_NAME "camera_windows")
33
project(${PROJECT_NAME} LANGUAGES CXX)
44

5+
cmake_policy(VERSION 3.14...3.24)
6+
57
# This value is used when generating builds using this plugin, so it must
68
# not be changed
79
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")

packages/file_selector/file_selector_linux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.1+3
2+
3+
* Sets a cmake_policy compatibility version to fix build warnings.
4+
15
## 0.9.1+2
26

37
* Clarifies explanation of endorsement in README.

packages/file_selector/file_selector_linux/linux/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
22
set(PROJECT_NAME "file_selector_linux")
33
project(${PROJECT_NAME} LANGUAGES CXX)
44

5+
cmake_policy(VERSION 3.10...3.24)
6+
57
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
68

79
list(APPEND PLUGIN_SOURCES

packages/file_selector/file_selector_linux/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: file_selector_linux
22
description: Liunx implementation of the file_selector plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_linux
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
5-
version: 0.9.1+2
5+
version: 0.9.1+3
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

packages/file_selector/file_selector_windows/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
## NEXT
1+
## 0.9.1+8
22

3+
* Sets a cmake_policy compatibility version to fix build warnings.
34
* Updates minimum Flutter version to 3.3.
45

56
## 0.9.1+7

packages/file_selector/file_selector_windows/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: file_selector_windows
22
description: Windows implementation of the file_selector plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22
5-
version: 0.9.1+7
5+
version: 0.9.1+8
66

77
environment:
88
sdk: ">=2.18.0 <4.0.0"

packages/file_selector/file_selector_windows/windows/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.14)
22
set(PROJECT_NAME "file_selector_windows")
33
project(${PROJECT_NAME} LANGUAGES CXX)
44

5+
cmake_policy(VERSION 3.14...3.24)
6+
57
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
68

79
list(APPEND PLUGIN_SOURCES

packages/local_auth/local_auth_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.8
2+
3+
* Sets a cmake_policy compatibility version to fix build warnings.
4+
15
## 1.0.7
26

37
* Clarifies explanation of endorsement in README.

packages/local_auth/local_auth_windows/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: local_auth_windows
22
description: Windows implementation of the local_auth plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22
5-
version: 1.0.7
5+
version: 1.0.8
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

packages/local_auth/local_auth_windows/windows/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.15)
22
set(PROJECT_NAME "local_auth_windows")
3+
cmake_policy(VERSION 3.15...3.24)
34
set(WIL_VERSION "1.0.220201.1")
45
set(CPPWINRT_VERSION "2.0.220418.1")
56
project(${PROJECT_NAME} LANGUAGES CXX)

packages/pigeon/platform_tests/test_plugin/windows/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ cmake_minimum_required(VERSION 3.14)
88
set(PROJECT_NAME "test_plugin")
99
project(${PROJECT_NAME} LANGUAGES CXX)
1010

11+
cmake_policy(VERSION 3.14...3.24)
12+
1113
# This value is used when generating builds using this plugin, so it must
1214
# not be changed
1315
set(PLUGIN_NAME "test_plugin_plugin")

packages/url_launcher/url_launcher_linux/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.5
2+
3+
* Sets a cmake_policy compatibility version to fix build warnings.
4+
15
## 3.0.4
26

37
* Clarifies explanation of endorsement in README.

packages/url_launcher/url_launcher_linux/linux/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
22
set(PROJECT_NAME "url_launcher_linux")
33
project(${PROJECT_NAME} LANGUAGES CXX)
44

5+
cmake_policy(VERSION 3.10...3.24)
6+
57
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
68

79
list(APPEND PLUGIN_SOURCES

packages/url_launcher/url_launcher_linux/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: url_launcher_linux
22
description: Linux implementation of the url_launcher plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_linux
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
5-
version: 3.0.4
5+
version: 3.0.5
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

packages/url_launcher/url_launcher_windows/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.6
2+
3+
* Sets a cmake_policy compatibility version to fix build warnings.
4+
15
## 3.0.5
26

37
* Clarifies explanation of endorsement in README.

packages/url_launcher/url_launcher_windows/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: url_launcher_windows
22
description: Windows implementation of the url_launcher plugin.
33
repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_windows
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22
5-
version: 3.0.5
5+
version: 3.0.6
66

77
environment:
88
sdk: ">=2.17.0 <4.0.0"

packages/url_launcher/url_launcher_windows/windows/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.10)
22
set(PROJECT_NAME "url_launcher_windows")
33
project(${PROJECT_NAME} LANGUAGES CXX)
44

5+
cmake_policy(VERSION 3.10...3.24)
6+
57
set(PLUGIN_NAME "${PROJECT_NAME}_plugin")
68

79
list(APPEND PLUGIN_SOURCES

0 commit comments

Comments
 (0)