conan-io / conan-io/docs

Create package & push to registry a C++ library I made w/ Conan + CMake (Conan 1)

Open
#3,246 3 comments 0 reactions 1 assignee Claimed by @memsharded View on GitHub
stage: triaging
Dominant language
C++
Stars
125
Forks
382
Avg merge
22h 39m
Merged PRs (30d)
21

Description

Hi,

I have to use Conan 1 right now because we have to store our remote registries in GitLab which only has Conan 1 support for the time being.

I'm having some doubt around how to transition...

From:
- Wrapping up a library I created w/ CMake and Conan (I used conanfile.py for the 3rd party dependencies my library depends on).

To:
- Creating a Conan package holding said library that I can push to a remote registry and share with the team (this implies I need know enough about building packages to be able to confidently tell the team what to write in CMake's "find_package" and "target_link_libraries", along with what to have them type in C++ "#include ..." statements when using my library).

Here are my questions:
1) Is it normal/encouraged to use the same conanfile.py for both tasks (i.e. the same conanfile.py for both for gathering third party dependencies during development and for creating the final package after development is finished)?
2) Regarding creating the package after development is finished: Is there a place in the documentation that focuses on how I can know what users should write in CMake's "find_package" and "target_link_libraries", along with what to type in C++ "#include ..." statements when using my libarary/Conan package? I know that, in general, doing an install with CMake can be tricky; is the expectation that package creators master CMake install ideas first and then "just know" how to wire everything up when making a Conan package? (I know that's a strange question... I'm just trying to get some intuition on expectations and resources).

Thanks...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.