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

How do I make vcpkg use the pre-installed Qt library instead of building it? #27574

Closed
SineStriker opened this issue Oct 31, 2022 · 8 comments
Closed
Assignees
Labels
category:question This issue is a question

Comments

@SineStriker
Copy link

I have installed the Qt 5.15.2 via Qt official installer, and it's at the root path of drive C.

When I want to use vcpkg to install a library which depends on Qt, vcpkg will download and build qt-base first. How to let vcpkg know that there's an existing Qt library and use it.

@Osyotr
Copy link
Contributor

Osyotr commented Oct 31, 2022

@SineStriker
Copy link
Author

Thanks, but it's not over. I add an simple vcpkg.json and portfile.cmake into a custom directory and pass it as overlay-ports to vcpkg install command, and then cmake cannot find Qt5Config.cmake...

How to pass an env such as Qt5_DIR to cmake via portfile.cmake?

@SineStriker
Copy link
Author

@SineStriker
Copy link
Author

set(ENV{Qt5_DIR} "/path/to/"

I think this is better.

@LilyWangLL LilyWangLL added the category:question This issue is a question label Nov 1, 2022
@LilyWangLL
Copy link
Contributor

Thanks for Osyotr's help. Since this issue has been resolved, so I am closing this issue for now.

@rockydut
Copy link

Can you list detailed implementation steps? QT is already installed, and external QT is used in vcpkg instead of recompilation.
My system is windows.

@rockydut
Copy link

@LilyWangLL Can you list detailed implementation steps? QT is already installed, and external QT is used in vcpkg instead of recompilation.
My system is windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

4 participants