Question

SFML, in this case, has a Git repo and a download page. Until now I have always downloaded from the download page, which came (at least for the compiler I use) with .a and .hpp files and could easily be used with MinGW with -l and -i tags.

When I wanted to use this on Github, though, a couple of problems arised.

  1. When copying it into the repo on the first commit, the Github graph would show 22k changes on the first commit and only a couple hundred on the following commits. I got around this by putting the download into a private repo and using it as a submodule. This isn't very elegant and still has the problem of being OS/compiler-specific.

  2. Using the official Github repo as a submodule. But how do you use external raw cpp and hpp files? Do you put the necessary cpp files into the Makefile? If so, what are the downloads on the download page for?

Was it helpful?

Solution

Adding a library in your git repo would make you a maintainer of another version of the library. You want to avoid that as much as possible.

Depending on the library and the target OS, the most reasonable approach is to have it listed as a dependency in the README, along with good documentation on how to install it on all target operating systems, or links to resources that describe how to install it. Maybe, if possible, provide an automated script, but it's not really necessary and not really helpful since building from source should be reserved to developers and power users.

For "normal" users, you should provide binaries that integrate with the operating system's dependency manager (preferably) or just contain a copy of the library.

Licensed under: CC-BY-SA with attribution
scroll top