-
Notifications
You must be signed in to change notification settings - Fork 989
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
header-only unzipped packages? #324
Comments
Even if the package is header-only, what you are writing is a package recipe. You have to generate a package "binary", that in this case it just copies the headers. I think you can check:
Both are header-only. Note that I also include Note that you can generate the package in any system, as it is independent from settings, so what I do to generate these packages is $ git clone ..project && cd project
$ conan export user/channel
$ conan test_package
$ conan upload My/0.2@user/channel --all If you are not using $ git clone ..project && cd project
$ conan export user/channel
$ conan install My/0.2@user/channel --build
$ conan upload My/0.2@user/channel --all Note the third step uses the package reference so it is not using any conanfile, it is installing/building the exported code. Please tell me if this makes sense. PD: There is an open PR to automatically create the skeleton for packages, so the test_package folder and contents will be generated, so it will be faster. There is also an open issue trying to automatically call the |
Thanks, but that didn't work either. Also it'd be a little annoying to force the users to download a binary when all they need to use the package is a few source files. Here's my latest attempt, go back one commit to see previous: |
Actually, they don't have to download a "binary", it is actually not a binary, just a set of source files. But note that the package recipe might not have such headers, as they might be in another repository different from the recipe. So it is necessary to "build" a package, even if that build doesnt actually involve compiling it, but just getting the headers are putting them in an appropriate folder. That is the case for header-only libraries. For source libraries, binaries are not necessary either, they can just be built locally, with the --build=Lib parameter. What would be your suggestion to improve this? (cloning your repo now to try it, will contact again soon) |
It seems it is a bug in the ``test_package |
Submitted a PR to fix this: #328. Most likely will be in 0.10, but please remember to use double quotes until then. Thanks for reporting this! |
Thanks, changing from Unfortunately the header files still aren't being packaged :( In
|
I didn't check that, let me do it. I see that you are using submodules to get the code, wouldn't it be easier just to clone the sources in the source() method? |
With this SamuelMarks/conan-rapidjson#1 it should work. Please check it. The main problem was the extra "rapidjson" in the include paths. |
Thanks, this looks like it'll work. Down to one remaining bug. Can't
I have found it here:
I have tried augmenting my CMakeLists.txt with:
Neither |
First a quick question. As it is just a header-only and then simple to get, do you really need the Find.cmake? Is it for compatibility with non-conan builds? The bug that you say, how would you reproduce it? From a new project with a conanfile.txt? Do you have such project or steps? Because with test_package it finds the #includes fine. Please tell me so I can have a look, thank you! |
Happy not to have a Find.cmake. Test project:
|
It is working for me. It works also commenting out the find_package() line. Steps $ cd project
$ mkdir build && cd build
$ conan install ..
$ cmake .. -G "Visual Studio 14"
$ cmake --build . --config Release
$ bin/testtttt.exe
1 Can you please copy the output and error? Thanks! |
I will be on IRC for a while now, channel #conan, if you need it. |
Thanks, issue is now resolved AFAIK PS: Maybe fix that install bug we chatted about on IRC? |
Sorry, lost the IRC session, and can't remember. What would be the bug? Maybe open an issue for it? |
Issue is lack of cleanup. So I |
All the header-only projects I see in the conan repository are zipped.
Unzipped attempt:
Error:
What am I doing wrong?
The text was updated successfully, but these errors were encountered: