From d5fd7d9fc253b5dc713bd79dd275b64d26dbe0aa Mon Sep 17 00:00:00 2001 From: Martin Willers Date: Tue, 5 Oct 2021 03:35:57 +0200 Subject: Make the legacy include path a CMake option (#332) Signed-off-by: Martin Willers --- doc/dlt_for_developers.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/dlt_for_developers.md b/doc/dlt_for_developers.md index 844eb40..bedb802 100644 --- a/doc/dlt_for_developers.md +++ b/doc/dlt_for_developers.md @@ -24,8 +24,6 @@ within the standard include directory. This example gives an overview of DLT usage inside an application by using a minimal code example. Detailed information about the API can be found later in this document. -Please note that for backwards compatibility also the legacy #include statement -`` is supported. Using it for new code is not recommended, though. ``` #include @@ -81,6 +79,15 @@ exports an IMPORTED CMake target; it does not set any variables, except for the `automotive-dlt_FOUND` variable that can be used to treat DLT as an optional dependency. +The generated CMake config file (which is implicitly being used when you call +`find_package(automotive-dlt)`) by default only adds the top-level directory +to the compiler's header search path; this requires that users' #include +directives are written in the regular form e.g. ``. If you want +to be able to use the legacy form `` as well (as is always allowed by +the pkg-config module for backwards compatibility reasons), you can configure +DLT with the CMake option `-DWITH_LEGACY_INCLUDE_PATH=On` in order to +achieve that. + ### DLT with pkg-config Alternatively to the CMake integration detailed above, it is also possible -- cgit v1.2.1