polyscope
polyscope copied to clipboard
Port to VCPKG
Hi, thx for this great lib. Could you also add a port to VCPKG dependency manager for easier usage? Please find attached how the port should look like for your library. You only have to submit a PR to VCPKG with the attached folder inside ports
folder. It is almost working, all you need to do is include an install
build target to CMake scripts.
polyscope.zip
Thanks, sounds great! I've never used VCPKG personally, but this seem like a good idea.
I've got a few other things in the queue, but I'll look in to this soon.
Just to bring up this issue again.
vcpkg
helps to make library cross-platform with their system, and is getting more and more popular as a package management system.
I helped to create an issue on their github: https://github.com/microsoft/vcpkg/issues/16769
I helped to create an issue on their github: microsoft/vcpkg#16769
I have looked into this. One problem is that the dependencies of this project must be acquired via vcpkg. So we have to patch the CMakeList filea a little bit. And what are the dependencies of this project? Are there github repos for glad
and stb
.
Theoretically you can get rid off your deps
folder and use vcpkg instead for dependencies.
@autoantwort vcpkg
has glad
and stb
. So it is safe to remove it from this project when importing to vcpkg
.
Ok cool, than we only have to add happly
to vcpkg first
@autoantwort Since that lib is so small with a few bunch header files, I think it can even be incorporated as part of this lib.
I would doubt if the vcpkg
maintainer will agree to add that, since it is too new and not widely used.
If it is an own lib, it should be an own lib in vcpkg. It has over 100 stars, more than some other ports, so I don't think that this is a problem. I have created microsoft/vcpkg#16788
Hi all, this sounds awesome!
Are there any good references for exactly what we need to do to get Polyscope on vcpkg? E.g., do we need to populate some config file, add certain things to the CMakeLists.txt
, etc? I found this link, but it doesn't really list explicit steps.
For the happly dependency, it's probably fine to just incorporate it directly in this repo; it's a minor, single-header dependency which is only tangentially used in Polyscope anyway, and it just happens to be written by the same author :). That being said, if others would benefit from having happly on vcpkg, I'm happy to add it there too!
Ah I just noticed the initial comment about adding an install
target, so that's at least one thing we need to do
Are there any good references for exactly what we need to do to get Polyscope on vcpkg? E.g., do we need to populate some config file, add certain things to the CMakeLists.txt, etc? I found this link, but it doesn't really list explicit steps.
I think the most important change is to support non in source dependencies. Vcpkg required that the dependencies are also in vcpkg, so there must be an way to get rid off the deps folder. You can leave the folder there, but there must be an option to disable the usage of it, so that the dependencies from vcpkg are used.
For the happly dependency, it's probably fine to just incorporate it directly in this repo; it's a minor, single-header dependency which is only tangentially used in Polyscope anyway, and it just happens to be written by the same author :). That being said, if others would benefit from having happly on vcpkg, I'm happy to add it there too!
The happly PR is already merged and the happly lib is in vcpkg.
Hey, I have some WIP on my fork about using vcpkg in polyscope, you can follow it here
This required some changes in how the Cmake logic is handled:
- the main cmakelists is now responsible for src/ (library) AND test/. Before the inner test folder cmakelists would add the parent directory, which is somewhat uncommon and does not play well with other cmake tools.
- refactored the cmake files to use a more modern, target based approach instead of setting globals.
TBD:
- Fixing compiler flags
- ~~Fixing github workflows~~
- ~~Make the main cmakelists build example/ conditionally~~
- ~~Test on macos/windows (linux build works locally already)~~
- Create a polyscopeConfig.cmake for importing the polyscope lib into other projects