From 3e6cfd6c2f174ac79835015d1e1fe35fc1c008b7 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Wed, 22 Jan 2020 11:58:24 +0000 Subject: [PATCH] CMake: Make the cppdap target's include directory public Avoids having to pull this in as an explicit include directory for projects that depend on cppdap. --- CMakeLists.txt | 2 +- README.md | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 79ff71f..2bc668c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,7 +140,7 @@ function(cppdap_set_target_options target) # target_compile_options(${target} PRIVATE "-Wl,--no-undefined") # endif() - target_include_directories(${target} PRIVATE ${CPPDAP_INCLUDE_DIR}) + target_include_directories(${target} PUBLIC ${CPPDAP_INCLUDE_DIR}) endfunction(cppdap_set_target_options) ########################################################### diff --git a/README.md b/README.md index cc40568..1fbebf2 100644 --- a/README.md +++ b/README.md @@ -62,12 +62,6 @@ This will define the `cppdap` library target, which you can pass to `target_link target_link_libraries( cppdap) # replace with the name of your project's target ``` -You will also want to add the `cppdap` public headers to your project's include search paths so you can `#include` the `cppdap` headers: - -```cmake -target_include_directories($ PRIVATE "${CPPDAP_DIR}/include") # replace with the name of your project's target -``` - You may also wish to specify your own paths to the third party libraries used by `cppdap`. You can do this by setting any of the following variables before the call to `add_subdirectory()`: