I'm working on exposing a C++ library that contains cpp and corresponding hpp files (essentially 1 hpp per cpp file + meta hpp files that include other hpp files).
I'm wondering what the best / "most accepted" way to structure this is. My current setup is:
pkg/ | inst/ | include/ | cpp-lib-file.hpp | src/ | Makevars | my-rcpp-wrapper.cpp | cpp-lib-file.cpp
Where Makevars contains:
PKG_CXXFLAGS = -I../inst/include
This works for me, but I kind of hate having the library cpp files and my rcpp wrapper files at the same level. Ideally I could do:
pkg/ | inst/ | include/ | cpp-lib-file.hpp | src/ | Makevars | my-rcpp-wrapper.cpp | cpp-lib/ | cpp-lib-file.cpp
I assume this is possible, and that I'm just not telling Makevars the right thing? I've tried a few adjustments but can't get it right. Anyone have ideas?
Edit) I've also stack-overflow-searched this to death and can't find a good answer, or I've just missed it.