Building with Conan


Conan is an open source, decentralized and multi-platform package manager to create and share native binaries.

To learn more about Conan itself you can visit Conan.

Conan is used in the openPASS project to create and manage the binaries of the used ThirdParty libraries.

Additional Prerequisites

To be able to work with Conan it is necessary to add additional packages.

pip install "conan>=1.0,<2.0"

Conan Recipes

A recipe is python file, which is used by conan to build and create a package. In this file there are several hooks available, which can be used for several tasks. E.g. Retrieving the source files, building from source, configuring dependencies, packaging, etc. Visit Conan. for detailed information about recipes.

Conan Create

The conan create command is used to create Conan packages from source code. It involves building the source code, packaging the resulting binaries and artifacts, and generating the necessary metadata to publish the package. The basic syntax of the command is as follows:

$ conan create <path_to_recipe> <pkg/version@user/channel>
  • <path_to_source>: The path to the conan recipe of that corresponding package.

  • <pkg/version@user/channel>: The user and channel specify the namespace under which the package with the corresponding version will be built.

$ conan create openscenario_engine/0.1@openpass/testing

This command will build the package openscenario_engine with version 1.0 under the user openpass and channel testing.

Optional Settings

The -o option allows you to pass optional settings to the conan create command, which can be used to customize the build process of the package. These settings are defined in the recipe. For example, you can specify build options, compiler flags, or any other configuration settings that influence the package creation process.

$ conan create openscenario_engine/0.1@openpass/testing -o MantleAPI_version=0.1 -o Yase_version=0.1

In this example, the -o option is used to set the MantleAPI_version and Yase_version build options for the openscenario_engine package. These options will be considered during the package creation process.


For the packages MantleAPI, Yase, openscenario_api and openscenario_engine corresponding commit ids can be used instead of version when creating the package

Conan Install

The conan install command is used to install Conan packages from a Conan recipe (a file) and its associated dependencies. It resolves and fetches the required packages from a remote Conan repository or local conan cache and installs them in the specified target location. The basic syntax of the command is as follows:

$ conan install <pkg/version@user/channel> -g <generator> -s <setting=value> --build <missing|outdated> --install-folder=<installation-path>
  • <pkg/version@user/channel>: The user and channel specify the namespace under which the package with the corresponding version will be built.

  • -g <generator>: Specifies the build system generator (e.g., cmake, make, visual_studio) for generating build files.

  • -s <setting=value>: Overrides a Conan setting defined in the recipe with the given value.

  • –build <missing|outdated>: Specifies whether to build missing or outdated packages.

Generate Deployment Files

The -g deploy option with the conan install command is used to generate deployment-related files and scripts for installing and running the package on a target system. These files can include packaging scripts, installation scripts, and other artifacts required for deploying the package to a specific environment.

$ conan install openscenario_engine/0.1@openpass/testing -g deploy --install-folder="my/installation/path"

This command will deploy the package openscenario_engine/0.1@openpass/testing at the installation path.


There are several additional commands, arguments and fields for these commands available. Please see Conan Docs for additional information.

Build only ThirdParties

openPASS requires number of third parties libraries and they are listed in conanfile.txt. To install all the dependencies, the script can be used.

The following file shows an example which can be used. This example is also available in the conan folder in the opSimulation repository.





The exact list of dependency can be found in the source code.