Commit 15e9ebaf by David Kruger Committed by Dominic Hamon

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.
parent febd0d7a
......@@ -18,6 +18,9 @@ set_target_properties(benchmark PROPERTIES
VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION}
)
target_include_directories(benchmark PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
)
# Link threads.
target_link_libraries(benchmark ${BENCHMARK_CXX_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment