question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Shipping conan projects

See original GitHub issue

I’ve been wondering how to ship binaries that are built with Conan. My constraints are that clients can’t use Conan on their machine to install my software (for various reasons) so I need to be able to generate a self contained archive with all the required dependencies. Basically for a conan project that means all its binaries plus all the binaries from its dependencies. (I consider that all “external” dependencies are “system” libraries that will be available on client machines)

I’ve been studying two approaches for now:

  1. Use CMake’s install() directives. It works fine for the project itself but requires a lot of hacking to parse the various variables from the conanbuild.cmake file and extract the list of the .so of .dll files needed from the dependencies.
  2. Have Conan do it for me. I was thinking about reusing the code of conan install to recursively execute the package step of each project in the dependency tree with the same target directory. That way I should be able to deploy all the files into a common directory and zip/tar it.

I’d also be interested in a way to filter out the “dev” files from the packages (like the headers and static libraries) so that I only get executables and required runtime libraries. My best idea so far would be an optional dev tag that can be used by package maintainers when defining the package() step to conditionally include the .h and .a/.lib files. I’ve thought about scopes but there’s already a dev scope that means something else.

Did you guys ever give some thought about this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

0reactions
danimtbcommented, Jan 29, 2019

I think deploy fits the use case nicely. I am closing this as solved. As this from long time ago and scopes no longer exist, please open a new issue if needed. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conan.io
Conan is an open source, decentralized and multi-platform package manager for C/C++ that allows you to create and share all your native binaries....
Read more >
Git, CMake, Conan - How to ship and reuse our C++ projects?
Git, CMake, Conan - How to ship and reuse our C++ projects? Sep. 24, 2020. • 0 likes • 282 views.
Read more >
C++Now 2018: Git, CMake, Conan: How to Ship and Reuse...
The purpose of that presentation is to solve the problems of build system and packaging that we have with large, multi-platform, C++ projects...
Read more >
Qt6 to ship with conan : r/cpp - Reddit
I think the optimal workflow is to install QtCreator using the Qt installer, use it to bootstrap your project with conan, and then...
Read more >
HOW TO BUILD A SHIP remasterd version [TIMELAPSE]
HOW TO BUILD A SHIP - BASE [ Timelapse ] - CONAN EXILES: Isle of Siptah. with minor changes with more accessible materials...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found