Skip to content

Making this library available as conan package #10

@jdoubleu

Description

@jdoubleu

Hi, I really like your library. I'd like to easily integrate it with other dependencies into my project using conan. Conan is a popular package manager in the C++ ecosystem, which integrates well with various build systems. By providing an "official" package in Conan's public repository, developers can easily consume this library in their projects.

I've started writing a conan "recipe" for this library, that is a definition of how this projects needs to be built by conan and can be consumed. But, first of all I wanted to check in with you, whether that's okay. I plan on submitting a PR to the conan-center-index later.

While creating the package, I faced some minor challenges. In order to ease the process of integrating this library, I'd suggest a few changes. I'm happy to submit these myself, if you agree:

  1. The conan package's version is currently tied to the VirtualBox SDK's version, because your library doesn't provide a version itselt. I assume, there hasn't been a need to and it would slightly complicate the maintenance effort. As for the conan package, this makes it harder e.g. to include fixes of this library, because we would have to wait for the next VirtualBox SDK to include them. It is recommended for a package version to be closely tied to a fixed git/code version.
    • I haven't asked the conan team yet, how they deal with these situations (i.e. a project not providing a compatible versioning scheme). One solution could be to use the publish date as version. However, that may make it harder to correlate the package's version with this library/repository.
  2. Is there a specific reason, why you manually prefix the library name on Windows with lib (see https://github.com/zrax/libvbox/blob/master/CMakeLists.txt#L56-L59)? This doesn't seem to affect the import lib (.lib) but only the shared library (.dll), making it harder for a generic find package mechanism (like CMake provides) to find and link to the library. I'd even argue that using non-standard behavior introduces issues with other tools/build systems, in general. I suggest removing this setting.
  3. Furthermore, the import lib (.lib) doesn't seem to be installed on Windows. This might have to do with the manual override of the install components (see https://github.com/zrax/libvbox/blob/master/CMakeLists.txt#L248-L249). If there's no specific reason to why they need to be customized, I suggest leaving them out, because they almost match the defaults anyways (e.g. default RUNTIME DESTINATION should already be bin). I'm not sure about the COMPONENT shlib, though.

I circumvented these issues by applying patches (see jdoubleu/conan-center-index@jdoubleu:conan-center-index:master...add-libvbox#diff-f0bfde5d643d1bdac51a43ad38d41024628a3f36c108c138e39fe3e2c62d9e1f) when building the conan recipe/package.

What do you think about these suggestions and making your library available through conan?

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions