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

Skip conan and vcpkg autosetup when using QtCreator #5305

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hemirt
Copy link
Contributor

@hemirt hemirt commented Apr 7, 2024

Added a QtCreatorPackageManager.cmake that gets auto imported when using Qt>6 with CMake and "Package manager auto setup" option (by default) turned on.

In this file, options to skip the automatic packagae manager setup is set up.

Options to skip exclusively conan, or vcpkg, are also set to on for self-documentation for the user.

Contributors using Qt Creator should pick just one (or none) to use and disable the other one, just now by default all are disabled.

A general status message with information about this gets sent right at the start of cmake command (as the QtCreatorPackageManager.cmake is one of the earliest things Qt Creator runs).

https://www.qt.io/blog/qt-creator-cmake-package-manager-auto-setup

[Extra Notes]
Vcpkg seems like it's not configured well to use with Qt Creator - since it downloads qt (and/or builds it).
Conan might not have this "issue" but I did not test it out, since even the build of openssl or boost was taking well over 15 minutes already.

@hemirt hemirt force-pushed the master branch 2 times, most recently from 9a1281f to bcef9df Compare May 20, 2024 20:34
Copy link
Contributor

@Nerixyz Nerixyz left a comment

Choose a reason for hiding this comment

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

Contributors using Qt Creator should pick just one (or none) to use and disable the other one, just now by default all are disabled.

In my opinion, if you have installed Qt Creator, you should be using conan, because it doesn't bring in Qt but uses the version installed on the system. vcpkg will compile qt from source, which can take some time (and might conflict with some assumptions Qt Creator makes (?)). Furthermore, only conan is tested in CI (#4099).

Conan might not have this "issue" but I did not test it out, since even the build of openssl or boost was taking well over 15 minutes already.

Conan doesn't build boost anymore. Only OpenSSL is built from source (this takes some time on Windows because they refuse to support any other build tool than nmake).


Since we support both package managers, I think it's a good idea to include a QtCreatorPackageManager.cmake (compared to adding it to .gitignore). However, only conan should be enabled. If a user doesn't want to have the auto-setup, they can turn it off in the Qt Creator settings.


This PR should also include documentation changes (at least) in BUILDING_ON_WINDOWS.md.

Comment on lines +5 to +7
set(QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP ON)
set(QT_CREATOR_SKIP_CONAN_SETUP ON)
set(QT_CREATOR_SKIP_VCPKG_SETUP ON)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I read the blog-post incorrectly, but doesn't QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP imply that checks for conan & vcpkg are skipped?

There should also be a trailing newline here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure about trailing newlines, I believe github removed them.

I included both for self-documentation, so that people know what they can turn OFF/ON.

Copy link
Member

Choose a reason for hiding this comment

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

It should be fine to comment out the QT_CREATOR_SKIP_VCPKG_SETUP option then, so people know it exists still. While adding comments in there, you could also add a link to https://www.qt.io/blog/qt-creator-cmake-package-manager-auto-setup in a comment so people know better where to configure/how to configure things

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants