kodi-pvr / pvr.argustv

Kodi's ARGUS TV client addon
GNU General Public License v2.0
11 stars 32 forks source link

building with jsoncpp-1.7.2-1.fc24 #57

Open sergiomb2 opened 8 years ago

sergiomb2 commented 8 years ago

https://github.com/kodi-pvr/pvr.argustv/blob/master/FindJsonCpp.cmake#L3 doesn't work

-- Checking for module 'jsoncpp'
--   Found jsoncpp, version 1.7.2
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find JsonCpp (missing: JSONCPP_INCLUDE_DIRS)

rpm -ql jsoncpp-devel

/usr/include/json
/usr/include/json/allocator.h
/usr/include/json/assertions.h
/usr/include/json/autolink.h
/usr/include/json/config.h
/usr/include/json/features.h
/usr/include/json/forwards.h
/usr/include/json/json.h
/usr/include/json/reader.h
/usr/include/json/value.h
/usr/include/json/version.h
/usr/include/json/writer.h
/usr/lib64/cmake
/usr/lib64/cmake/jsoncpp
/usr/lib64/cmake/jsoncpp/jsoncppConfig-release.cmake
/usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake
/usr/lib64/libjsoncpp.so
/usr/lib64/pkgconfig/jsoncpp.pc
/usr/share/doc/jsoncpp
/usr/share/doc/jsoncpp/NEWS.txt

we got new files

/usr/lib64/cmake/jsoncpp/jsoncppConfig-release.cmake
/usr/lib64/cmake/jsoncpp/jsoncppConfig.cmake

cat /usr/lib64/pkgconfig/jsoncpp.pc

prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=/usr/include

Name: jsoncpp
Description: A C++ library for interacting with JSON
Version: 1.7.2
URL: https://github.com/open-source-parsers/jsoncpp
Libs: -L${libdir} -ljsoncpp
Cflags: -I${includedir}

using : pkg_check_modules (JSONCPP json) works, by I don't understand why it works , but pass the missing: JSONCPP_INCLUDE_DIRS

sergiomb2 commented 8 years ago

./kodi-pvr/pvr.filmon/FindJsonCpp.cmake ./kodi-pvr/pvr.stalker/FindJsonCpp.cmake ./kodi-pvr/pvr.argustv/FindJsonCpp.cmake ./kodi-pvr/pvr.pctv/FindJsonCpp.cmake

sergiomb2 commented 8 years ago

ping

craigscott-crascit commented 6 years ago

This was recently brought up in the CMake issue tracker and it would seem that the problem stems from pkg-config automatically stripping out default system header search path (i.e. /usr/include) from the Cflags. See this comment for the explanation. It would seem that FindJsonCpp.cmake should not assume JSONCPP_INCLUDE_DIRS is non-empty.

sergiomb2 commented 6 years ago

the important part of my previous commits mention here

+#https://github.com/kodi-pvr/pvr.argustv/issues/57 +find -name "FindJsonCpp.cmake" -exec sed -i 's/JSONCPP jsoncpp/JSONCPP json/g' {} ';'

+#https://github.com/kodi-pvr/pvr.argustv/issues/57 +find -name "FindJsonCpp.cmake" -exec sed -i 's/JSONCPP jsoncpp/JSONCPP json/g' {} ';'