mirror of
https://github.com/google/benchmark.git
synced 2025-01-15 22:30:52 +08:00
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.
This commit is contained in:
parent
febd0d7a7a
commit
15e9ebaf83
@ -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})
|
||||
|
Loading…
Reference in New Issue
Block a user