-
Notifications
You must be signed in to change notification settings - Fork 96
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
Allow usage as sub-project #51
Comments
@Flamefire Thanks for your report. Could you submit a PR with the needed changes ? That would be great ! |
I will. What about my second point? Needs an owner decision ;) |
@Flamefire Thanks for your feedback. It makes sense to me to have a subfolder. Maybe we can make that configurable somehow ? |
While I understand the idea of having it configurable I'd rather not. Every option added must/should be tested so every option added increases the amount to test by a factor of 2. (On/off with every other option) Downside of the subfolder: currently installed project uses no subfolder in the include, but a subfolder in the install: installed to So IMO: Use a subfolder, bump the major version as per SemVer, don't use an option toggle. Oh and while doing that: Maybe require C++11? Should be supported wide enough already and allows to replace the typedefs at Lines 55 to 70 in be75a34
unique_ptr from fromBuffer and/or making it movable. I also noticed that your MakeFile already adds -std=c++0x although it doesn't seem to be used. Finally: Maybe drop the makefile completely? It is not a "clean" Makefile to be used e.g. by package maintainers, so rather factor out the dependency installation into shell scripts (code like in my updated travis.yml) and announce CMake as the "official" way.Just mentioning all this so it can be considered when bumping the major version. |
@Flamefire That's very promising ! Regarding the include, the goal is to follow the standards as much as possible, and also to keep it simple. I wonder how vcpkg will behave, since libzippp has been included in it (see microsoft/vcpkg#6801 and #46). Since this will change the building of libzippp, I don't mind making a new major version with some breaking changes, such as the include, so let's go 👍 |
That is indeed an issue. Users will use the targets and expect Maybe: Use the subfolder, but add Then which one? If there will only be 1 header then Maybe just keep it as-is. IMO there is no real standard for handling stuff like that, so... |
@Flamefire I don't see any other header than I would say to keep things as-is, having |
Ok then it will stay as |
I suggest to support use cases using this as a git submodule and via cmake
add_subdirectory
Changes required that I've seen:
libzippp/CMakeLists.txt
Line 8 in be75a34
CMAKE_SOURCE_DIR vs PROJECT_SOURCE_DIR
)#include <libzippp.h>
? Often a subfolder is used:#include <libzippp/libzipp.h>
This allows adding more headers later without clobbering the includes. Example:libzippp/config.h
which is impossible with having the subfolder in the include path. Relevant code: https://github.com/ctabin/libzippp/blob/master/CMakeLists.txt#L18-L19LIBZIPPP_EXPORTS
public:libzippp/CMakeLists.txt
Line 25 in be75a34
libzippp/CMakeLists.txt
Line 36 in be75a34
libzippp::libzippp
(same as installed name, so either can be used)BTW: Nice modern CMake! 👍
The text was updated successfully, but these errors were encountered: