
conan Documentation Release 1.13.3 conan Sep 24, 2021 CONTENTS 1 Introduction 3 1.1 Open Source...............................................3 1.2 Decentralized package manager.....................................3 1.3 Binary management...........................................4 1.4 Cross platform, build system agnostic..................................4 1.5 Stable...................................................5 2 Install 7 2.1 Install with pip (recommended).....................................7 2.2 Install from brew (OSX).........................................8 2.3 Install from AUR (Arch Linux).....................................8 2.4 Install the binaries............................................8 2.5 Initial configuration...........................................9 2.6 Install from source............................................9 2.7 Update..................................................9 2.8 Python 2 Deprecation Notice....................................... 10 3 Getting Started 11 3.1 An MD5 Encrypter using the Poco Libraries.............................. 11 3.2 Installing Dependencies......................................... 14 3.3 Inspecting Dependencies......................................... 15 3.4 Searching Packages........................................... 18 3.5 Building with Other Configurations................................... 18 4 Using packages 21 4.1 Installing dependencies......................................... 21 4.2 Using profiles............................................... 25 4.3 Workflows................................................ 27 5 Creating Packages 31 5.1 Getting Started.............................................. 31 5.2 Recipe and Sources in a Different Repo................................. 35 5.3 Recipe and Sources in the Same Repo.................................. 36 5.4 Packaging Existing Binaries....................................... 39 5.5 Understanding Packaging........................................ 41 5.6 Defining Package ABI Compatibility.................................. 43 5.7 Inspecting Packages........................................... 51 5.8 Packaging Approaches.......................................... 51 5.9 Package Creator Tools.......................................... 56 6 Uploading Packages 59 i 6.1 Remotes................................................. 59 6.2 Uploading Packages to Remotes..................................... 61 6.3 Using Bintray............................................... 62 6.4 Artifactory Community Edition for C/C++............................... 66 6.5 Running conan_server.......................................... 67 7 Developing packages 73 7.1 Package development flow........................................ 73 7.2 Packages in editable mode........................................ 77 7.3 Workspaces................................................ 81 8 Package apps and devtools 87 8.1 Running and deploying packages.................................... 87 8.2 Creating conan packages to install dev tools............................... 90 8.3 Build requirements............................................ 93 9 Mastering Conan 99 9.1 Use conanfile.py for consumers..................................... 99 9.2 Conditional settings, options and requirements............................. 101 9.3 Version ranges.............................................. 102 9.4 Build policies............................................... 104 9.5 Environment variables.......................................... 104 9.6 Virtual Environments........................................... 106 9.7 Logging.................................................. 107 9.8 Sharing the settings and other configuration............................... 110 9.9 Conan local cache: concurrency, Continuous Integration, isolation................... 110 9.10 Package Revisions............................................ 111 10 Systems and cross building 115 10.1 Cross building.............................................. 115 10.2 Windows Subsystems.......................................... 123 11 Extending Conan 127 11.1 Python requires: reusing python code in recipes [EXPERIMENTAL]................. 127 11.2 Hooks................................................... 129 12 Integrations 135 12.1 CMake.................................................. 135 12.2 Autotools: configure/make........................................ 144 12.3 Visual Studio............................................... 144 12.4 Apple/Xcode............................................... 147 12.5 Compilers on command line....................................... 149 12.6 Android Studio.............................................. 151 12.7 CLion................................................... 156 12.8 Ninja, NMake, Borland......................................... 161 12.9 pkg-config and .pc files....................................... 161 12.10 Boost Build................................................ 165 12.11 B2 (Boost Build)............................................. 165 12.12 QMake.................................................. 165 12.13 Premake................................................. 167 12.14 Make................................................... 169 12.15 qbs.................................................... 171 12.16 Meson Build............................................... 172 12.17 SCons................................................... 172 12.18 Docker.................................................. 173 ii 12.19 Git.................................................... 173 12.20 Jenkins.................................................. 174 12.21 Travis CI................................................. 176 12.22 Appveyor................................................. 178 12.23 Gitlab................................................... 180 12.24 Circle CI................................................. 181 12.25 YouCompleteMe (vim).......................................... 183 12.26 Custom integrations........................................... 183 12.27 Linting conanfile.py........................................... 187 12.28 Microsoft’s Azure DevOps (TFS, VSTS)................................ 187 13 Howtos 197 13.1 How to package header-only libraries.................................. 197 13.2 How to launch conan install from cmake................................ 199 13.3 How to create and reuse packages based on Visual Studio....................... 200 13.4 Creating and reusing packages based on Makefiles........................... 203 13.5 How to manage the GCC >= 5 ABI................................... 205 13.6 Using Visual Studio 2017 - CMake integration............................. 206 13.7 How to manage C++ standard [EXPERIMENTAL]........................... 209 13.8 How to use docker to create and cross build C and C++ conan packages................ 210 13.9 How to reuse Python code in recipes................................... 213 13.10 How to create and share a custom generator with generator packages................. 216 13.11 How to manage shared libraries..................................... 220 13.12 How to reuse cmake install for package() method............................ 225 13.13 How to collaborate on other users’ packages.............................. 226 13.14 How to link with Apple Frameworks.................................. 226 13.15 How to package Apple Frameworks................................... 227 13.16 How to collect licenses of dependencies................................. 228 13.17 How to extract licenses from headers.................................. 228 13.18 How to capture package version from SCM: git............................. 228 13.19 How to capture package version from SCM: svn............................ 229 13.20 How to capture package version from text or build files......................... 229 13.21 How to use Conan as other language package manager......................... 230 13.22 How to manage SSL (TLS) certificates................................. 235 13.23 How to check the version of the Conan client inside a conanfile.................... 236 13.24 Use a generic CI with Conan and Artifactory.............................. 237 14 Reference 239 14.1 Commands................................................ 239 14.2 conanfile.txt............................................... 291 14.3 conanfile.py............................................... 293 14.4 Generators................................................ 325 14.5 Profiles.................................................. 348 14.6 Build helpers............................................... 352 14.7 Tools................................................... 373 14.8 Configuration files............................................ 396 14.9 Environment variables.......................................... 405 14.10 Hooks [EXPERIMENTAL]....................................... 413 15 Videos and links 419 16 FAQ 421 16.1 Upgrading to Conan 1.0......................................... 421 16.2 General.................................................. 423 16.3 Using Conan............................................... 424 iii 16.4 Troubleshooting............................................. 426 17 Changelog 429 17.1 1.13.3 (27-Mar-2019).......................................... 429 17.2 1.13.2 (21-Mar-2019).......................................... 429 17.3 1.13.1 (15-Mar-2019).......................................... 429 17.4 1.13.0 (07-Mar-2019).......................................... 429 17.5
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages485 Page
-
File Size-