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>
This commit is contained in:
Cristian Adam
2021-02-18 18:50:11 +01:00
parent 813d020fa5
commit cc0fa86ffd
10 changed files with 899 additions and 6 deletions

View File

@@ -1003,5 +1003,40 @@
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
\endcode
\li \b conan.cmake
CMake script used by Qt Creator's auto setup of package manager dependencies.
The sources can be found in:
\list
\li \c QtCreator/src/share/3rdparty/package-manager/conan.cmake
\li \l https://github.com/conan-io/cmake-conan
\endlist
The MIT License (MIT)
Copyright (c) 2018 JFrog
\badcode
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\endcode
\endlist
*/