magwyz / pastec

Image recognition open source index and search engine
http://pastec.io
GNU Lesser General Public License v3.0
620 stars 175 forks source link

cmake does not find libjsoncpp on debian sid #30

Closed xrmx closed 7 years ago

xrmx commented 8 years ago

Hello,

on debian sid with libjsoncpp-dev 1.6.5 installed cmake doesn't find it:

- Could NOT find libjsoncpp (missing:  LIBJSONCPP_INCLUDE_DIR) 

Looking at the cmake module it looks like it's looking for libjsoncpp but here it's called jsoncpp:

$ pkg-config --cflags jsoncpp
-I/usr/include/jsoncpp

Tried cooking this patch but does not help:

diff --git a/cmake/Modules/Findjsoncpp.cmake b/cmake/Modules/Findjsoncpp.cmake
index 4857396..c0dfbce 100644
--- a/cmake/Modules/Findjsoncpp.cmake
+++ b/cmake/Modules/Findjsoncpp.cmake
@@ -6,12 +6,12 @@
 #  LIBJSONCPP_DEFINITIONS - Compiler switches required for using libjsoncpp

 find_package(PkgConfig)
-pkg_check_modules(PC_LIBJSONCPP QUIET libjsoncpp)
+pkg_check_modules(PC_LIBJSONCPP QUIET jsoncpp)
 set(LIBJSONCPP_DEFINITIONS ${PC_LIBJSONCPP_CFLAGS_OTHER})

 find_path(LIBJSONCPP_INCLUDE_DIR json.h
           HINTS ${PC_LIBJSONCPP_INCLUDEDIR} ${PC_LIBJSONCPP_INCLUDE_DIRS}
-          PATH_SUFFIXES libjsoncpp)
+          PATH_SUFFIXES jsoncpp)

 find_library(LIBJSONCPP_LIBRARY jsoncpp
              HINTS ${PC_LIBJSONCPP_LIBDIR} ${PC_LIBJSONCPP_LIBRARY_DIRS} )
fernandezcuesta commented 8 years ago

I managed to find it with the patch described in #8

xrmx commented 7 years ago

@magwyz has this been fixed?