meson include directory
jwidauer opened this issue · comments
Description
Hi there!
I've been using doctest for quite a while using CMake and Conan and have been loving it!
I was now trying to use it directly as a meson subproject.
While doing so, I noticed that in the current meson.build
file, it declares the dependency to directly include the doctest
directory.
It's specifically this line:
doctest_dep = declare_dependency(include_directories: include_directories('doctest'))
This means that, to be able to use doctest from a meson project, one would have to include it like this:
#include <doctest.h>
Instead of the way that is shown in the examples and done for all the other build systems:
#include <doctest/doctest.h>
Is this intended?
If not, I would assume the above line in the meson.build
file to be:
doctest_dep = declare_dependency(include_directories: include_directories('.'))
Steps to reproduce
Try and use doctest as a subproject in a project using meson as the build system.
This is basically just #670 but from the other direction. When I opened the other ticket, I based it on the assumption that the directions in the tutorial and throughout the documentation -- which say to use #include "doctest.h"
-- were correct.
I would support #include <doctest.h>
/ #include "doctest.h"
as the way to properly include the library, as <doctest/doctest.h>
personally feels redundant. It also leaves #include <doctest/part>
as an obvious choice for include parts of the library if there's ever any splitting of the header into multiple smaller components.