Search code examples
githubdllcross-platform

Committing DLL's and Libs to GitHub for Cross-Platform Program


I have a question regarding committing .dll and .lib files for a cross-platform program. For windows, there are two .lib and .dll files that are needed, but for Ubuntu they are not needed, they just need to install certain packages.

I am using cmake and link the libraries differently depending on the operating system.

Basically my question is if it is bad practice to include the .lib and .dll files in the repository and be downloaded by Ubuntu users and just not used? How would you handle this?


Solution

  • You shouldn't commit binary dependencies to a repository. They tend to bloat the repository and make maintenance operations like git gc take much longer than necessary.

    Since your tag mentions GitHub, I would just provide the binary dependencies as part of a release asset for your releases. In other words, if you offer a Windows download in a zip file, just include them in your zip file. You could also just provide them as a separate release asset if necessary.