From 15e9ebaf8363e723478cba23d0651274201c7750 Mon Sep 17 00:00:00 2001 From: David Kruger Date: Tue, 23 May 2017 11:40:31 -0400 Subject: [PATCH] Associate the required include directory with the benchmark library (#393) Using target_include_directories CMake will implicitly add the the necessary include paths to targets which link against the benchmark library. This is useful when the benchmark repo is included as a subdirectory in another CMake build. --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 77077739..244484b8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,6 +18,9 @@ set_target_properties(benchmark PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} ) +target_include_directories(benchmark PUBLIC + $ + ) # Link threads. target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})