File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,13 @@ endif()
65
65
config_compiler_and_linker() # from ${gtest_dir}/cmake/internal_utils.cmake
66
66
67
67
# Adds Google Mock's and Google Test's header directories to the search path.
68
+ # Get Google Test's include dirs from the target, gtest_SOURCE_DIR is broken
69
+ # when using fetch-content with the name "GTest".
70
+ get_target_property (gtest_include_dirs gtest INCLUDE_DIRECTORIES )
68
71
set (gmock_build_include_dirs
69
72
"${gmock_SOURCE_DIR} /include"
70
73
"${gmock_SOURCE_DIR} "
71
- "${gtest_SOURCE_DIR} /include"
72
- # This directory is needed to build directly from Google Test sources.
73
- "${gtest_SOURCE_DIR} " )
74
+ "${gtest_include_dirs} " )
74
75
include_directories (${gmock_build_include_dirs} )
75
76
76
77
########################################################################
You can’t perform that action at this time.
0 commit comments