Skip to content
Thomas Klute edited this page Dec 22, 2025 · 9 revisions

Prerequisite

  • clone the conan-packages repo from github

Add a new version of a library to a recipe

  • open the conandata.yml file of the recipe you want to add a version to.
  • You may specify multiple versions in conandata.yml.
  • Add the version and the url of the new source tar.gz.
  • Manually download the source and run 'sha256sum source-file.tar.gz' in a linux shell.
  • Add the hash value from the output of sha256sum.
  • Example:
sources:
  "0.16.2":
    url: https://bitbucket.org/odedevs/ode/downloads/ode-0.16.2.tar.gz
    sha256: b26aebdcb015e2d89720ef48e0cb2e8a3ca77915f89d853893e7cc861f810f22
  "0.16.3":
    url: https://bitbucket.org/odedevs/ode/downloads/ode-0.16.3.tar.gz
    sha256: c741dbf49bfc468ce2964824e5bc3f906ea956b1ae3594c50d351c383f03c413

Build Conan packages locally for Windows

  • You need to have set up the NaoDevil framework setup (at least the Windows part of it)
  • Check your conan profile (should be in C:\Users\<username>\.conan\profiles\default) to be like this:
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=17
compiler.cppstd=20
compiler.runtime=MD
build_type=Release
[options]
[build_requires]
[env]
  • Hint: when running cmake configuration in Visual Studio, cmake prints the required profile. Example:
1> [CMake] Configuration:
1> [CMake] [settings]
1> [CMake] arch=x86_64
1> [CMake] arch_build=x86_64
1> [CMake] build_type=RelWithDebInfo
1> [CMake] compiler=Visual Studio
1> [CMake] compiler.cppstd=20
1> [CMake] compiler.runtime=MD
1> [CMake] compiler.version=17
1> [CMake] os=Windows
1> [CMake] os_build=Windows
1> [CMake] *:build_type=Release
1> [CMake] [options]
1> [CMake] [build_requires]
1> [CMake] [env]
  • Note: *:build_type=Release causes cmake to use Release as build type when searching for delendencies
  • open a "x64 Native Tools Command Promt for VS 2022" Shell from the Start Menu
  • cd to the recipe directory (example: conan-packages/ode)
  • run conan create . <version>@_/_

Build Conan packages locally for Linux

  • You need to have set up the NaoDevil framework setup (the full installation)
  • open a linux shell
  • check you conan profile (typically in ~/.conan/profiles/default) to look like this:
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=11
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]
  • cd to the recipe directory (example: conan-packages/ode)
  • note: You must not reuse the directory used for building the windows version - copy the recipe files to a separate directory
  • run conan create . <version>@_/_

Upload conan packages to NaoDevils repo

  • before doing this: ask Arne or Aaron
  • make changes to the existing recipe or create a new one and test that compilation on Windows and Linux works
  • clean up the recipe directory (remove build folders, etc)
  • commit and push the changes to the recipe
  • cd to the recipe directory
  • run conan export . <packagename>/<version>@/
  • run conan upload -r naodevils --all <packagename>/<version>
  • (note: you need to know username / password to do so)
  • this will upload the recipe
  • Optionally: upload binary packages for Windows / Linux:
  • Build the conan recipe locally for Windows (see above)
  • cd to the recipe directory
  • run conan upload -r naodevils --all <packagename>/<version>@_/_
  • Build the conan recipe locally for Linux (see above)
  • cd to the recipe directory
  • run conan upload -r naodevils --all <packagename>/<version>@_/_