Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[freetype] Add cmake policy CMP0011 and CMP0012 #19459

Closed

Conversation

JackBoosY
Copy link
Contributor

Fix bug when using freetype:

CMake Warning (dev) at /home/work/vcpkg/installed/x64-linux/share/freetype/vcpkg-cmake-wrapper.cmake:3 (if):
  if given arguments:

    "ON"

  An argument named "ON" appears in a conditional statement.  Policy CMP0012
  is not set: if() recognizes numbers and boolean constants.  Run "cmake
  --help-policy CMP0012" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.
Call Stack (most recent call first):
  /home/work/vcpkg/scripts/buildsystems/vcpkg.cmake:736 (include)
  /home/work/vcpkg/downloads/tools/cmake-3.20.2-linux/cmake-3.20.2-linux-x86_64/share/cmake-3.20/Modules/FindX11.cmake:255 (find_package)
  /home/work/vcpkg/scripts/buildsystems/vcpkg.cmake:782 (_find_package)
  CMakeLists.txt:699 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

And

CMake Warning (dev) in /home/work/vcpkg/installed/x64-linux/share/freetype/vcpkg-cmake-wrapper.cmake:
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /home/work/vcpkg/installed/x64-linux/share/freetype/vcpkg-cmake-wrapper.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.

Related: #17055

@JackBoosY JackBoosY added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Aug 9, 2021
@JackBoosY JackBoosY linked an issue Aug 9, 2021 that may be closed by this pull request
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 57bd7102d9fd880daa1b0958692294c4a125f6d8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 19650fa..434d4fe 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2142,7 +2142,7 @@
     },
     "freetype": {
       "baseline": "2.10.4",
-      "port-version": 0
+      "port-version": 1
     },
     "freetype-gl": {
       "baseline": "2020-09-14",
diff --git a/versions/f-/freetype.json b/versions/f-/freetype.json
index 4462655..4877d26 100644
--- a/versions/f-/freetype.json
+++ b/versions/f-/freetype.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "a03c381a612922ba27cf170da915c53c41f9ad30",
+      "version-semver": "2.10.4",
+      "port-version": 1
+    },
     {
       "git-tree": "dabcba1d5153c796480c50c459ef045b5db8d2a4",
       "version-string": "2.10.4",

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 57bd7102d9fd880daa1b0958692294c4a125f6d8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/f-/freetype.json b/versions/f-/freetype.json
index 4877d26..c5da271 100644
--- a/versions/f-/freetype.json
+++ b/versions/f-/freetype.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "a03c381a612922ba27cf170da915c53c41f9ad30",
+      "git-tree": "42566110002caeba02e4dc508249bce0aa32a848",
       "version-semver": "2.10.4",
       "port-version": 1
     },

versions/f-/freetype.json Outdated Show resolved Hide resolved
@@ -1,65 +1,72 @@
_find_package(${ARGS})
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait what? This policy was introduced in CMake version 2.8.0

Why do you if that ? Also you probably only wanted to if the cmake_policy calls?
(furthermore it looks like a cmake_minimum_required call is missing in the calling project? )

CMAKE_VERSION VERSION_GREATER_EQUAL 3.3
I also don't get why you use this. I thought we all agreed indirectly to assume at least 3.5.1

Copy link
Contributor Author

@JackBoosY JackBoosY Aug 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I saw many examples on our cmake wrappers before. So only need to use the 3.5.1 condition to include the part of the policy code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Neumann-A Does that met you requirement?

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new experimental fast check for PR issues. Please let us know if this bot is helpful!

After committing all other changes, the version database must be updated
git add -u && git commit
git checkout 57bd7102d9fd880daa1b0958692294c4a125f6d8 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/f-/freetype.json b/versions/f-/freetype.json
index 4877d26..11ad021 100644
--- a/versions/f-/freetype.json
+++ b/versions/f-/freetype.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "a03c381a612922ba27cf170da915c53c41f9ad30",
+      "git-tree": "b50dfb329d424da0a2bab4e4c2bac95e54fd6096",
       "version-semver": "2.10.4",
       "port-version": 1
     },

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole PR is only needed to support projects which have a `cmake_minimum_required(VERSION ...) of less than 2.8.

ports/freetype/vcpkg-cmake-wrapper.cmake Outdated Show resolved Hide resolved
ports/freetype/vcpkg-cmake-wrapper.cmake Outdated Show resolved Hide resolved
ports/freetype/vcpkg-cmake-wrapper.cmake Outdated Show resolved Hide resolved
@PhoebeHui PhoebeHui marked this pull request as draft August 26, 2021 06:09
@JackBoosY JackBoosY marked this pull request as ready for review October 13, 2021 07:42
@JackBoosY
Copy link
Contributor Author

gstreamer regressions are a baseline issue.

@JackBoosY
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

strega-nil-ms pushed a commit that referenced this pull request Apr 1, 2022
…#21641)

* Verify library location for debug vs. release

* Use existing variables for wrapper

* Always install freetype wrapper

* Quote @expressions

* Set policies for freetype wrapper (#19459)

* Test JPEG

* Fix jpeg wrapper for CMake < 3.12

* Test TIFF

* Test with current and oldest supported CMake

* Test and fix icu cmake wrapper

* CMake policy fixes [skip actions]

* Update versions

* CI

* CI

* Nicole CRs

* Disable Curses test

* Prefer <Pkg>_VAR over <PKG>_VAR

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[nuklear] fatal error: 'malloc.h' file not found
4 participants