diff options
author | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2015-12-10 22:28:00 (GMT) |
---|---|---|
committer | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2015-12-10 22:28:00 (GMT) |
commit | 0162ff72e80e50e06264081d6e278a5af5d5228a (patch) | |
tree | a1b88ef0e480b40bc1afd33bb64b2bec55568aa9 /googlemock | |
parent | c1cd9c2b05d5acff704e4b831c01d2905efb0c1f (diff) | |
parent | f601ee162e23eb3fe49446d13ccd6d30ca687218 (diff) | |
download | googletest-0162ff72e80e50e06264081d6e278a5af5d5228a.zip googletest-0162ff72e80e50e06264081d6e278a5af5d5228a.tar.gz googletest-0162ff72e80e50e06264081d6e278a5af5d5228a.tar.bz2 |
Merge pull request #657 from audiofanatic/issue655-targetHeaderDeps
Add include dirs to targets if CMake version supports it
Diffstat (limited to 'googlemock')
-rw-r--r-- | googlemock/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 7f330c5..beb259a 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -92,6 +92,14 @@ cxx_library(gmock_main src/gmock-all.cc src/gmock_main.cc) +# If the CMake version supports it, attach header directory information +# to the targets for when we are part of a parent build (ie being pulled +# in via add_subdirectory() rather than being a standalone build). +if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11") + target_include_directories(gmock INTERFACE "${gmock_SOURCE_DIR}/include") + target_include_directories(gmock_main INTERFACE "${gmock_SOURCE_DIR}/include") +endif() + ######################################################################## # # Install rules |