aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2019-09-10 16:17:03 +0200
committerEike Ziller <eike.ziller@qt.io>2019-09-11 06:11:21 +0000
commit24da5b14d460655057e799f3ac1676831c9418fc (patch)
treede93e1428691d94867305a5d9259b54ef07c4797 /cmake
parente9d8ff21b06d4224765b293de828f2cd1485bf3b (diff)
CMake Build: Fix include directory for external yaml-cpp
On Linux one gets: /usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/../../../../include which fails to compile. Resolve the path so CMake can detect/remove the duplicate to fix this. Change-Id: I4987c8edd99e60d31beb2d5075a949090996bc3a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Findyaml-cpp.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/Findyaml-cpp.cmake b/cmake/Findyaml-cpp.cmake
index a369420183..bcdcfd104b 100644
--- a/cmake/Findyaml-cpp.cmake
+++ b/cmake/Findyaml-cpp.cmake
@@ -9,7 +9,8 @@
find_package(yaml-cpp 0.5 QUIET NO_MODULE)
if (yaml-cpp_FOUND)
# target doesn't set include directory for some reason
- target_include_directories(yaml-cpp INTERFACE ${YAML_CPP_INCLUDE_DIR})
+ get_filename_component(yaml_cpp_include_dir ${YAML_CPP_INCLUDE_DIR} ABSOLUTE)
+ target_include_directories(yaml-cpp INTERFACE ${yaml_cpp_include_dir})
else()
set(yaml-cpp_FOUND 1)
set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp")