[CMake] FindJsoncpp.cmake: search pkg-config libs in default search paths.
commit6caeeabdcfd2d97cf36572c96c7d750ae631d71d
authorMichael Kruse <llvm@meinersbur.de>
Tue, 18 Jul 2017 10:09:53 +0000 (18 10:09 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 18 Jul 2017 10:09:53 +0000 (18 10:09 +0000)
treef08ccaf6168881cb2b8c56e7bd0359018db79415
parent1e6807ea3713059684a688af21bad64909a39f85
[CMake] FindJsoncpp.cmake: search pkg-config libs in default search paths.

pkg_search_module(JSONCPP) should set
JSONCPP_LIBDIR/JSONCPP_LIBRARY_DIRS to where the libjsoncpp.so can be
found. However, on Ubuntu 14.04 LTS (Trusty Tahr) it returns /usr/lib
while the libjsoncpp library can be found at
/usr/lib/x86_64-linux-gnu/libjsoncpp.so. Thus, while searching for
the full path of the jsoncpp library, it is not found.

JSONCPP_LIBDIR is correctly set to /usr/lib/x86_64-linux-gnu on e.g.,
Ubuntu 16.04 LTS (Xenial Xerus )

Fix by removing the NO_DEFAULT_PATH flag, in order to search the system
default paths even if the library is not found in
JSONCPP_LIBDIR/JSONCPP_LIBRARY_DIRS.

This fixes bug llvm.org/PR33798.

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@308287 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/FindJsoncpp.cmake