summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorMartin Ejdestig <mejdestig@luxoft.com>2020-10-21 04:22:49 +0200
committerGitHub <noreply@github.com>2020-10-21 11:22:49 +0900
commit9608717a84d83e0bad0a0855cf3479d585c86613 (patch)
treedf59ce30aae301afe73de0729a0279dbd281c1fc /src/shared
parentb6f52e39d6435af3296a7ef1ef9a8e823ce36aaa (diff)
downloadDLT-daemon-9608717a84d83e0bad0a0855cf3479d585c86613.tar.gz
Make it easier to use libdlt when building DLT as a CMake subproject (#254)
By calling target_include_directories() for the dlt target in src/lib/. CMake filters out duplicate include paths. So even if the include directories are already added with include_directories() in the top-level CMakeLists.txt, they are not duplicated when the compiler is invoked. For example, with this patch, the following works: [~/Source/foo]$ ls bar CMakeLists.txt dlt-daemon [~/Source/foo]$ cat CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(foo) add_subdirectory(dlt-daemon) add_subdirectory(bar) [~/Source/foo]$ cat bar/CMakeLists.txt cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(bar) add_executable(bar main.cpp) target_link_libraries(bar dlt) install(TARGETS bar RUNTIME DESTINATION bin) bar/main.cpp contains the example from the top of doc/dlt_for_developers.md that does "#include <dlt.h>" and then uses the DLT logging macros. Signed-off-by: Martin Ejdestig <martin.ejdestig@volvocars.com>
Diffstat (limited to 'src/shared')
0 files changed, 0 insertions, 0 deletions