Skip to content

Making the repo suitable for having it as submodule #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Making the repo suitable for having it as submodule #40

wants to merge 1 commit into from

Conversation

alphamarket
Copy link

The way the library has been implemented we need to install the library in order to use it, otherwise nothing will work as in the source code you include the files from system's file like `#include <gzip/...> and it made the project impossible for having it as a submodule; since this project is a header-only, the changes in this commit are compatible with the submodule approach and current make it installed approach. Test units are also passing.

@int-ua
Copy link

int-ua commented Jun 21, 2021

Is there an example on how to use it as a submodule? I assume you meant CMake submodule? I'm also planning to use the repository as a git submodule and looks like this change will make it easier too. CleverRaven/Cataclysm-DDA#44218

@alphamarket
Copy link
Author

git submodule add https://github.com/mapbox/gzip-hpp.git gzip

In the project you just include the stuff and start working.

#include "gzip/include/utils.hpp"
#include "gzip/include/compress.hpp"
#include "gzip/include/decompress.hpp"

If you check the changes in the commit the way you are including your local files don't allow to use it as a submodule.

@themightyoarfish
Copy link

It's a bit weird having to explicitly refer to the include/ subdirectory though, normally I believe you would either have another layer aka include/gzip/ in the file tree, or install the project inside your build folder when including it from the parent project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants