diff options
author | Cristian Adam <cristian.adam@qt.io> | 2021-02-18 18:50:11 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2021-02-19 17:54:45 +0000 |
commit | cc0fa86ffd6c202aeb7ee091bbf8a91d7623718c (patch) | |
tree | 2e57cfb1b544a9cb679d3065b87d9d3b39de9925 /src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp | |
parent | 813d020fa5fbc10bdbc3220e417f5da8bcaff4b5 (diff) | |
download | qt-creator-cc0fa86ffd6c202aeb7ee091bbf8a91d7623718c.tar.gz |
CMakeProjectManager: Add package manager auto-setup
Adds CMAKE_PROJECT_INCLUDE_BEFORE as initial CMake parameters
with a path to a auto-setup.cmake script that will run
conan install if a conanfile.txt is found in the prject.
A project can have a local QtCreatorPackageManager.cmake file
that will be loaded if exists.
The auto setup can be controlled via the following CMake variables:
* QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP
* QT_CREATOR_SKIP_CONAN_SETUP
* QT_CREATOR_SKIP_VCPKG_SETUP
conan.cmake is taken from https://github.com/conan-io/cmake-conan
which takes care of the conan specific compiler cruft. License
is MIT.
Fixes: QTCREATORBUG-25362
Change-Id: I70a6e1abc5600851d048f1590ca24204ce52a503
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp index 501c4210e6..9b7c71ca44 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp @@ -70,6 +70,8 @@ CMakeSpecificSettingWidget::CMakeSpecificSettingWidget(CMakeSpecificSettings *se m_ui.neverCopyRadio->setChecked(true); break; } + + m_ui.packageManagerAutoSetup->setChecked(settings->packageManagerAutoSetup()); } void CMakeSpecificSettingWidget::apply() @@ -77,6 +79,7 @@ void CMakeSpecificSettingWidget::apply() int popupSetting = m_ui.newFileAddedCopyToCpliSettingGroup->checkedId(); m_settings->setAfterAddFileSetting(popupSetting == -1 ? AfterAddFileAction::ASK_USER : static_cast<AfterAddFileAction>(popupSetting)); + m_settings->setPackageManagerAutoSetup(m_ui.packageManagerAutoSetup->isChecked()); m_settings->toSettings(Core::ICore::settings()); } |