yhirose / cpp-peglib

A single file C++ header-only PEG (Parsing Expression Grammars) library
MIT License
879 stars 112 forks source link

Compatibility with CPM package manager #297

Closed trcwm closed 4 months ago

trcwm commented 4 months ago

Thanks for making this awesome library!

When including cpp-peglib with the CPM package manager in a larger project, the top level project cannot find the include files because it points to the wrong location. This is easily fixed by changing the INTERFACE path of cpp-peglib in CMakeLists.txt from:

target_include_directories(peglib INTERFACE ${CMAKE_SOURCE_DIR}) to target_include_directories(peglib INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

This will most likely also help other package managers that do not install but include the source.

Regards, Niels.

yhirose commented 4 months ago

@trcwm thanks for the suggestion. Could you please send a pull request, since I am not a CMAKE expert? Thanks!

trcwm commented 4 months ago

Submitted.

trcwm commented 4 months ago

Thank you!