Skip to content
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

conan package #21

Closed
marknefedov opened this issue May 3, 2020 · 10 comments
Closed

conan package #21

marknefedov opened this issue May 3, 2020 · 10 comments
Labels
enhancement New feature or request

Comments

@marknefedov
Copy link

Any chances this can be packaged to Conan?
It's a handy-dandy tool to manage c++ libraries https://conan.io/.

@TheLavaBlock TheLavaBlock added the enhancement New feature or request label May 3, 2020
@TheLavaBlock
Copy link
Member

Thank you for the suggestion.

Unfortunately I don't have time for it right now,
but I am grateful for any help.

@pezcode
Copy link
Contributor

pezcode commented May 3, 2020

I'm strapped for time as well but I'd be able to give this a shot in a month or so (possibly add vcpkg support, too). If anyone else is impatient and wants to try it themselves: https://docs.conan.io/en/latest/creating_packages.html

@pezcode
Copy link
Contributor

pezcode commented May 13, 2020

Had some free time (or rather procrastination time) and gave it a try 🤠

https://github.com/pezcode/conan-liblava

Tested on Win 10 with MSVC (v142 and clang-cl) and Ubuntu WSL with GCC 8 and Clang 9 (pending #22).

For now, there is no shared option, you can only build as a static library. This would require changes to liblava's CMakeLists.txt.

Integration into conan-center-index would be nice but requires a few changes. I tried following their guidelines as closely as possible, but using conandata.yml to specify sources seems impossible since github's zip/tar.gz link doesn't include subrepositories.

Would appreciate some feedback, especially from @markusgod. I'm not much of a Conan user so I might have missed something important.

@marknefedov
Copy link
Author

marknefedov commented May 13, 2020

Looks perfect to me. But i'm far from packaging expert. I believe if you just send pull request to cci, guys will point out what need to be fixed.
The only thing url must point to CCI, and current url content should be "homepage".
https://github.com/conan-io/conan-center-index/blob/374a1f4ee8707146822bc48d733aaf07a88f25f5/recipes/volk/all/conanfile.py

@pezcode
Copy link
Contributor

pezcode commented May 13, 2020

Thanks for the feedback 👌

I just noticed a mistake with the library order. Didn't notice until I actually called some useful functions in test_package. Going to fix that in a bit. fixed

Looks perfect to me. But i'm far from packaging expert. I believe if you just send pull request to cci, guys will point out what need to be fixed.

I'll tackle that a little later once I have access there (if that's still a thing with their early access).

@TheLavaBlock
Copy link
Member

🚀 I'm also waiting for EAP

TheLavaBlock added a commit to liblava/conan-liblava that referenced this issue Aug 4, 2020
@TheLavaBlock
Copy link
Member

TheLavaBlock commented Aug 4, 2020

I forked and cloned https://github.com/liblava/conan-center-index (I deleted it)

But still figuring out how to config conandata.yml and conanfile.py because of missing git submodules in source releases. 🤔

@pezcode
Copy link
Contributor

pezcode commented Aug 4, 2020

One way to do this is to specify every single submodule, at which point you can only hope that the submodules don't have submodules themselves. Also a pain to maintain for each release. Maybe there's a way to automate this part with a script 🤔

The 'official' way to do this (and I suppose the first comment you'll get on a PR at CCI) is to use existing conan packages for every dependency. For some dependencies that's probably not too problematic, but some fast-moving ones (imgui, Vulkan headers) could be a bit of a pain because you have to wait for the packages to update before integrating into lava. Add a vcpkg port to this and you have to watch two places. This also would require changes to how dependencies are found and linked in CMakeLists.txt, but that should be comparably straight-forward.

@TheLavaBlock
Copy link
Member

Thanks for your summary of the two ways, but how about just releasing source files with checked out submodules? okay that will break the whole packaging idea and some submodules could be not ready for official release. Like you said, I'm guessing it doesn't go through either. And as you already mentioned, adding other ports (like vcpkg) can take much more effort than desired. A script will help a lot, no matter what way we go. I'm curious what conan would suggest to do. ❔

@TheLavaBlock
Copy link
Member

i think the best and simplest solution is to stick with the current recipe. I always want to keep liblava up to date and the effort involved with CCI is too great. If anyone has a better suggestion, please let me know here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants