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

[vtk] fix usage and add the usage file #20356

Merged
merged 9 commits into from
Sep 28, 2021

Conversation

JackBoosY
Copy link
Contributor

VTK will call the installed cmake file FindEXPAT.cmake first, that caused the usage issue:

CMake Error in CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "EXPAT::EXPAT".

And the printed usage is incorrect:

    find_package(3.13 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE ZLIB::ZLIB)

    find_package(3.16 CONFIG REQUIRED)
    target_link_libraries(main PRIVATE PostgreSQL::PostgreSQL)

    find_package(99 CONFIG REQUIRED)
    # Note: 36 target(s) were omitted.
    target_link_libraries(main PRIVATE X11::SM X11::Xi X11::Xt X11::Xv)

    find_package(vtk CONFIG REQUIRED)
    # Note: 159 target(s) were omitted.
    target_link_libraries(main PRIVATE LZ4::LZ4 OGG::OGG VTK::lz4 VTK::ogg)

Fix them.

Fixes #20237 #9947 #19035.

@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 Sep 26, 2021
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.

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/vtk/portfile.cmake

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 59a3f35e7e5a3281e59863a4a0123c325899f8f9 -- versions
./vcpkg x-add-version --all
Diff
diff --git a/versions/baseline.json b/versions/baseline.json
index 1252bd0..7da8201 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -6850,7 +6850,7 @@
     },
     "vtk": {
       "baseline": "9.0.3-pv5.9.1",
-      "port-version": 1
+      "port-version": 2
     },
     "vtk-dicom": {
       "baseline": "0.8.12",
diff --git a/versions/v-/vtk.json b/versions/v-/vtk.json
index 5b67419..3e01710 100644
--- a/versions/v-/vtk.json
+++ b/versions/v-/vtk.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "6ff01d20ffe635afe21234c246b179489fc9a503",
+      "version-semver": "9.0.3-pv5.9.1",
+      "port-version": 2
+    },
     {
       "git-tree": "413d7fcbff9b50e57e486d1249c841a5e25c0def",
       "version-semver": "9.0.3-pv5.9.1",

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/vtk/portfile.cmake

@JackBoosY
Copy link
Contributor Author

@jasjuang Can you please test this PR?

Thanks.

@JackBoosY
Copy link
Contributor Author

@Neumann-A Any suggestions?

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.

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/vtk/portfile.cmake

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.

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/vtk/portfile.cmake

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.

You have modified or added at least one portfile where deprecated functions are used.

If you feel able to do so, please consider migrating them to the new functions:
vcpkg_install_cmake -> vcpkg_cmake_install (from port vcpkg-cmake)
vcpkg_build_cmake -> vcpkg_cmake_build (from port vcpkg-cmake)
vcpkg_configure_cmake -> vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)
vcpkg_fixup_cmake_targets -> vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)

In the ports that use the new function, you have to add the corresponding dependencies:

{
  "name": "vcpkg-cmake",
  "host": true
},
{
  "name": "vcpkg-cmake-config",
  "host": true
}

The following files are affected:

  • ports/vtk/portfile.cmake

@jasjuang
Copy link
Contributor

I can confirm that this fixes #20237. Looking forward to the merge!

@JackBoosY JackBoosY requested a review from PhoebeHui September 27, 2021 05:46
Copy link
Contributor

@PhoebeHui PhoebeHui left a comment

Choose a reason for hiding this comment

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

LGTM

@PhoebeHui PhoebeHui added the info:reviewed Pull Request changes follow basic guidelines label Sep 27, 2021
@BillyONeal BillyONeal merged commit 878d351 into microsoft:master Sep 28, 2021
@BillyONeal
Copy link
Member

Thanks for the usability improvement!

@JackBoosY JackBoosY deleted the dev/jack/20237 branch September 28, 2021 05:41
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. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
4 participants