From 15b58766f56006eb0a82413bb7f135bde92ffecc Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Wed, 19 Oct 2016 17:11:31 +0200 Subject: [PATCH] Use pkg-config variables for yaml-cpp. (#84) Related to googlecartographer/cartographer_ros#117. --- cmake/functions.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/functions.cmake b/cmake/functions.cmake index 27f0beb..431ab08 100644 --- a/cmake/functions.cmake +++ b/cmake/functions.cmake @@ -104,7 +104,9 @@ macro(_common_compile_stuff VISIBILITY) endif() if(ARG_USES_YAMLCPP) - target_link_libraries("${NAME}" yaml-cpp) + target_include_directories("${NAME}" SYSTEM ${VISIBILITY} + "${YAMLCPP_INCLUDE_DIRS}") + target_link_libraries("${NAME}" ${YAMLCPP_LIBRARIES}) endif() if(ARG_USES_CAIRO)