-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy thirdparties in conan 2.X #13511
Comments
Hi @tatraian Thanks for your question. Indeed the However I have a couple of questions:
|
I am submitting #13526 that would solve these issues, for Conan 2.0.3 release. |
Hello @memsharded Thanks your very fast reaction, I will check it in 2.0.3. We ship different binary packages on different platforms. So we have a binary package for windows and for linux. We don't plan to ship our thirdparties as an extra package, but together with our binaries. Conan/CMake are able to handle different build types on the same platform, but we use only the release version of the thirdparties (in both cases, during development and on the shipped system too). Since we write application that becomes very slow in "real" debug builds, we use "debug" build that is similar to RelWithDebInfo, just with O0 (on Windows we also link to Multithreaded Dynamic runtime as in case of release builds). We basically ship a server with plugin support. Our server depends our libraries and the thirdparties too. The shared libraries are copied beside the exe on windows with cmake's install command ( Anyway an alternative solution could be to use conan instead of "installed" binaries and headers, since the solution above basically makes impossible the using conan in plugin developments, since (as far as I know) there is no way to add prebuild libraries to conan project as dependency (so for example conanfile dependency description about asio library use our shared version instead of its own dependency resolution). But you see well, I really don't think this solution is good, or easy. Unfortunately our sdk word is the most complicated that I had to work with, and I didn't really had better idea(s) as above... |
Conan 2.0 made this possible, but only for
yes, in any case, I hope the features above in the PR could help you to create the deployed binaries that could be convenient for your distribution. Just a couple of warnings when you test it:
|
#13526 merged, it will be in next 2.0.3, looking forward your feedback, thanks! |
There is still a gap in this, because for |
This was finally fixed in 2.0.4, at least Preparing some example and documentation in conan-io/examples2#94, I think this can be closed in 2.0.4 milestone, feedback welcome! |
Hello @memsharded, Sorry for the late reaction, bu I was lost my work (this issue came during moving our project a totally new build infrastructure with deadline). I checked the fix with direct_deploy on 2.0.4 and it works smoothly! Thanks your very fast fix and sorry again may reaction delay... |
No prob @tatraian !! We know that these things happen (also happen to us, don't hesitate to comment or ping on an issue that didn't get a response, to re-surface it), no need to apologize for it, thanks very much for following up and reporting :) |
Hello,
In our project I have to ship our thirdparties together with our libraries (we develop an SDK like product, and we have to avoid thirdparty library version missmatches).
Our conan thirdparties comes from our conanfile.py with the running of conan install. In the conan file we use CMakeDeps generator. We use cmake to build our project after conan install ran. So I plan to ship the whole "conan install directory" to customers.
Since conan install directory contains only links to the local cache I used the two built in deployer of conan (direct and full deploys). For me (with 2.0 and 2.0.1) any of them worked perfect. In both cases the xxx_PACKAGE_FOLDER_RELEASE directory points to the deployed folder, but all paths in the xxx_BUILD_MODULES_PATHS_RELEASE variable still points to the local cache.
But independently the wrong BUILD_MODULES_PATHS variable the generated cmake variables are not relocatable, since absolute paths are used.
I tried to write a custom deployer and tried to change the deploy folder (dep.set_deploy_folder(new_folder)) to ${CMAKE_CURRENT_LIST_DIR} but that caused error in install since (this is logical) that is not a real directory.
Is there any way to make the cmake config files relocatable in the deploy folder? I think if someone call deploy on its dependencies than probably want a hierarchy without absolute paths.
I also attach a sample project too. I called it with command:
conan install . --output-folder install --profile:build ./gcc2004 --profile:host ./gcc2004 --build=missing --settings=build_type=Release -r conancenter --deploy=direct_deploy
conan_test.zip
thanks
The text was updated successfully, but these errors were encountered: