From cc0fa86ffd6c202aeb7ee091bbf8a91d7623718c Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 18 Feb 2021 18:50:11 +0100 Subject: 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 --- src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/cmakeprojectmanager/cmakespecificsettingspage.cpp') 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(popupSetting)); + m_settings->setPackageManagerAutoSetup(m_ui.packageManagerAutoSetup->isChecked()); m_settings->toSettings(Core::ICore::settings()); } -- cgit v1.2.1