I'm working with conan 0.16.0 and I can't figure how to install a package in the local store. My idea is to create a recipe, create every package I want from the recipe, install them in the local store and then upload them on a conan server to make them available to other developer without them having to recompile the package as they are already available.
What I actually do :
conan export user/channelconan buildmkdir mypackage, cd mypackage and conan package ..The only way I found to have my package in the local store is to have another recipe that requires the the previous recipe and then make a conan install --build. A package of my first recipe will be build and will be present in my local store but this way forces me to create "fake" requirements to achieve my goal.
Is there any way I could build my packages for the settings I want and then directly install them in the local store ?
From the conan docs you have to conan install to create a package. The conan build command is only used to build your local project, not to build the package that you have exported.
Actually, the preferred way to create and test packages is using the test_package functionality, please follow the tutorial. Generally speaking the docs are written in a very tutorial like fashion, I recommend following them.
If you check the docs or command line help to conan package it will show you that is a command only for debugging, and to be used in rare occassions. You can perfectly work without it.
UPDATE:
The above referenced Conan 1 (and specifically to an ancient Conan 0.16 version), which is deprecated and no longer maintained or supported.
The new Conan 2 docs are in https://docs.conan.io/
The recommended tutorial for installing and creating packages: https://docs.conan.io/2/tutorial.html
The conan package command no longer exists
The test_package functionality is covered in https://docs.conan.io/2/tutorial/creating_packages/test_conan_packages.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With