From 5b70ce7730ecc01ee491232635f760fbdda439d7 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Tue, 18 Jul 2017 10:10:02 +0000 Subject: [PATCH] [CMake] FindJsoncpp.cmake: Use descriptive variable name for libjsoncpp.so path. find_library(lib) stores the result in the variable "lib", which is also cached in CMakeCache.txt. This could theoretically conflict if jsoncpp required two libraries, which each would get cached as "lib". Use a more descriptive and disambiguative "jsoncpp_${libname}" for that. git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@308289 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/FindJsoncpp.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/FindJsoncpp.cmake b/cmake/FindJsoncpp.cmake index c4bf3283..cee44d10 100644 --- a/cmake/FindJsoncpp.cmake +++ b/cmake/FindJsoncpp.cmake @@ -5,11 +5,11 @@ if (PkgConfig_FOUND) # Get the libraries full paths, to be consistent with find_library(). set(fulllibs) foreach (libname IN LISTS JSONCPP_LIBRARIES) - find_library(lib NAMES ${libname} + find_library(jsoncpp_lib${libname} NAMES ${libname} HINTS ${JSONCPP_LIBDIR} ${JSONCPP_LIBRARY_DIRS} ) - if (lib) - list(APPEND fulllibs ${lib}) + if (jsoncpp_lib${libname}) + list(APPEND fulllibs ${jsoncpp_lib${libname}}) else () list(APPEND fulllibs ${libname}) endif () -- 2.11.4.GIT