• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Conan 1.x examples

Build Status

Conan Examples

Several Conan examples to complement the documentation and blog.

Examples

Getting started with Conan

Example how to use Conan to consume binaries.

Documentation: https://docs.conan.io/en/latest/getting_started.html

Package development flow

Example how to use Conan commands to develop a package recipe.

Documentation: https://docs.conan.io/en/latest/developing_packages/package_dev_flow.html

Workspace

Example how to use Conan Workspaces.

Documentation: https://docs.conan.io/en/latest/developing_packages/workspaces.html

Editable Packages

Example how to use Conan Editable Packages.

Documentation: https://docs.conan.io/en/latest/developing_packages/editable_packages.html

Serializing your data with Protobuf

Demonstrate how to use Protobuf to serialize data between C++ and Python.

Blog Post: https://blog.conan.io/2019/03/06/Serializing-your-data-with-Protobuf.html

Using Facebook Folly with Conan

Demonstrate how to use Folly to validate an URI using Futures, FBString, Executors, and Format.

Blog Post: https://blog.conan.io/2018/12/03/Using-Facebook-Folly-with-Conan.html

An introduction to Dear ImGui and how to use with Conan

Demonstrate how to use Dear ImGui with Conan to add a GUI to an OpenGL3 application.

Exporting targets with CMake and reuse with find_package()

Use CMake to declare, export and install the targets of some libraries and using Conan to reuse them with find_package and the multi-configuration project.

Using the cmake_find_package_multi generator

Demonstrate how to use the cmake_find_package_multi generator to integrate seamlessly CMake with Conan using find_package in a multi-configuration project.

Multi-configuration package (N configs -> 1 package)

Example on how to create multi-configuration debug/release packages covering the N configs -> 1 package use case:

  • Remove the build_type from settings.
  • Have a CMake script that differentiate debug and release artifacts (set_target_properties(hello PROPERTIES DEBUG_POSTFIX _d)).
  • Have a build() that builds both configs.
  • Have a package_info() method that accounts for both configs self.cpp_info.debug.libs, etc.

Documentation: https://docs.conan.io/en/latest/creating_packages/package_approaches.html#n-configs-1-package

Lockfiles

Using lockfiles in CI to rebuild a whole project

When a package in a dependency graph is modified and a new version or revision is created, it is sometimes desired to test if that new version works well within a larger product or project, that is, when that package is part of a larger dependency graph. The packages that depend on the modified one might need to be rebuilt, but if something else changed, it is impossible to achieve reproducible builds.

Using lockfiles can enforce the same upstream dependencies, to ensure reproducible builds and to re-build and test such scenarios.

Documentation: https://docs.conan.io/en/latest/versioning/lockfiles.html#how-to-use-lockfiles-in-ci

Integrate a build system in Conan

Shows how to integrate a build-system in Conan using an installer, a build-helper and a custom generator.

Deployment

Shows how to use conan json generator with custom script to automate the creation of deployable artifact (makeself.io)

Documentation: https://docs.conan.io/en/laters/integrations/deployment.html

How can I reproduce the build steps?

All our examples can be built on Windows, Linux and Mac. If you are interested to reproduce the examples in your environment, please check the scripts inside every example folder.

LICENSE

MIT

More Repositories

1

conan

Conan - The open-source C and C++ package manager
Python
7,779
star
2

conan-center-index

Recipes for the ConanCenter repository
Python
896
star
3

cmake-conan

CMake wrapper for conan C and C++ package manager
Python
815
star
4

conan-docker-tools

Some tools for automated package generation
Dockerfile
221
star
5

conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
Python
164
star
6

docs

conan.io reStructuredText documentation
HTML
103
star
7

conan-clion-plugin

CLion C/C++ IDE plugin for Conan Package Manager
Kotlin
98
star
8

examples2

Conan 2.x examples
Python
76
star
9

training

(Deprecated) Support code for conan 1.X trainings
Python
61
star
10

conan-vs-extension

Conan Extension for Visual Studio
C#
59
star
11

wishlist

This repo is to propose libraries, frameworks, and code in general that users would like to have in conan
49
star
12

tribe

Conan 2.0 Tribe
47
star
13

hooks

Official Conan client hooks
Python
32
star
14

conan-extensions

Some extra Conan commands for different purposes, like artifactory tasks, conan-center-index, etc
Python
24
star
15

meta-conan

Yocto layer for the Conan project
BitBake
24
star
16

hello

C++ Hello World library and application used Conan C/C++ Package Manager demos and examples
CMake
14
star
17

conan-io.github.io

Conan's Blog
HTML
11
star
18

conan_ci_jenkins

Jenkins Library for regular CI
Groovy
10
star
19

website

https://conan.io
JavaScript
9
star
20

training-ci

Material for advanced CI/CD trainings
Shell
9
star
21

web

Conan website, including home and ConanCenter
JavaScript
7
star
22

libhello

C++ Hello World library used in Conan C/C++ Package Manager tutorial and examples
C++
4
star
23

modular-boost

3
star
24

cmake-training

C++
3
star
25

test

Other test than the regular test suite, regression, tools etc.
Python
2
star
26

conanclientcert

Repository to host an updated certificate file, after LetsEncrypt expired theirs 30 Sept
2
star
27

.github

1
star
28

code-of-conduct

Code of conduct for the Conan organization
1
star
29

cci-sources-backup

Temporal solution for sources that are no longer accessible
1
star