I'm new to conan and I've been going through several youtube videos for Conan and what I'm not clear about how the consumer of the library will know where the library will be hosted. It's an open source c project hosted on github let's say at github.com/username/foo
MyLibrary conanfile.py
looks like this
from conans import ConanFile
class Foo(ConanFile):
def build(self):
cmake = CMake(self)
cmake.configure(source_dir="src")
cmake.build()
cmake.install()
I understand this conanfile.py should be on the root of my github project.
Users of the Library
I found this file from somewhere that users of the library should having in their root directory.
[requires]
folly/2019.10.21.00
[generators]
cmake
Edit:
for 1) I found the answer here but how do I specify about the github link I've.
I'm not clear about how the consumer of the library will know where the library will be hosted.
The library is downloaded under source
method. It's documented here and here
If you want to develop a recipe, I recommend you reading Creating Packages section on docs.
What is folly/2019.10.21.00 in this case? It's the package reference, please, read the Getting Started section.
How my consumer conanfile.txt of MyLibrary should look like?
Basically, it should contain your package reference, and that's it. Please, read conanfile.txt section.
Essentially how can I distribute my library
You have two main options, locally, most common for companies, and globally, usually for Open Source projects.
Uploading to Artifactory (locally)
As you are starting on Conan right now, please, read carefully the getting started section and follow the guide, it's well explained and also contains a good exercise which helps to understand how Conan works.
After been confident consuming a recipe, I recommend you reading the Creating Packages section, which contains information from the provider perspective.
Reading the documentation is best way to learn, jumping steps will make you more confuse about some features.
Also, there is a good channel for help and discussion on Slack, the channel name is #conan.