From 64f19a9fc39fb56bf643a82545cce922630091b4 Mon Sep 17 00:00:00 2001 From: Deniz Bahadir Date: Tue, 19 Oct 2021 15:14:44 +0200 Subject: [PATCH] CMake: Fix values of INTERFACE_INCLUDE_DIRECTORIES property Replace semicolon by `$` in generator-expressions of target property `INTERFACE_INCLUDE_DIRECTORIES` of CMake targets `gtest`, `gtest_main`, `gmock` and `gmock_main`. Fixes: #3616 Signed-off-by: Deniz Bahadir --- googlemock/CMakeLists.txt | 5 +++-- googletest/CMakeLists.txt | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt index 2b55ba15..3ab75a1b 100644 --- a/googlemock/CMakeLists.txt +++ b/googlemock/CMakeLists.txt @@ -105,11 +105,12 @@ endif() # 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") + string(REPLACE ";" "$" dirs "${gmock_build_include_dirs}") target_include_directories(gmock SYSTEM INTERFACE - "$" + "$" "$/${CMAKE_INSTALL_INCLUDEDIR}>") target_include_directories(gmock_main SYSTEM INTERFACE - "$" + "$" "$/${CMAKE_INSTALL_INCLUDEDIR}>") endif() diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt index 15b8f0c3..b03e71c5 100644 --- a/googletest/CMakeLists.txt +++ b/googletest/CMakeLists.txt @@ -131,11 +131,12 @@ set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION}) # 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") + string(REPLACE ";" "$" dirs "${gtest_build_include_dirs}") target_include_directories(gtest SYSTEM INTERFACE - "$" + "$" "$/${CMAKE_INSTALL_INCLUDEDIR}>") target_include_directories(gtest_main SYSTEM INTERFACE - "$" + "$" "$/${CMAKE_INSTALL_INCLUDEDIR}>") endif() target_link_libraries(gtest_main PUBLIC gtest)