microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.9k stars 6.33k forks source link

overlay port:quazip can't find FindQt5.cmake #38969

Open insar-dev opened 4 months ago

insar-dev commented 4 months ago

Describe the bug I have installed qt using online installer. Now I create a cmake project with overlay port in vs2022. I have set necessary var in CMakepreset.json:

image

error info:

image

I upload the test project. vcpkg_test.zip

Environment

To Reproduce Steps to reproduce the behavior:

  1. ./vcpkg install xxxx
  2. See error Repro code when

Expected behavior A clear and concise description of what you expected to happen.

Failure logs

Additional context Add any other context about the problem here.

insar-dev commented 4 months ago

It seems that CMAKE_PREFIX_PATH has not been passed to CMakelist.txt of custom port.

JonLiu1993 commented 4 months ago

@insar-dev, thanks for posting this issue, I will try to reproduce your issue locally.

dg0yt commented 4 months ago

It seems that CMAKE_PREFIX_PATH has not been passed to CMakelist.txt of custom port.

Hardly any setup details are passed through from your user project to vcpkg tool to portfiles script mode to CMake project mode. You use the regular CMake integration variables,
https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration#settings-reference.

Basically, mixing non-vcpkg dependencies and vcpkg dependencies could be troublesome. Qt comes with a lot of dependencies, e.g. zlib.

github-actions[bot] commented 3 months ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.