From a065175d58c04f3919886e1e7e3d1103dac59eb1 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 15 Jul 2020 16:25:56 +0200 Subject: [PATCH] CMake build: Fix configuring with CMake 3.10 and external yaml-cpp CMake 3.10 does not allow using target_include_directories with INTERFACE on imported targets. https://gitlab.kitware.com/cmake/cmake/-/issues/15689 Fixes: QTCREATORBUG-24356 Change-Id: I2427276f0851010cda2321c45eff0628713af2ff Reviewed-by: Cristian Adam --- cmake/Findyaml-cpp.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake index 3d5828ebd8b..d8e92f070d4 100644 --- a/cmake/Findyaml-cpp.cmake +++ b/cmake/Findyaml-cpp.cmake @@ -15,7 +15,7 @@ if (yaml-cpp_FOUND) unset(yaml_cpp_include_dir CACHE) find_path(yaml_cpp_include_dir yaml-cpp/yaml.h) endif() - target_include_directories(yaml-cpp INTERFACE ${yaml_cpp_include_dir}) + set_target_properties(yaml-cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}") else() set(yaml-cpp_FOUND 1) set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp")