Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building with jsoncpp-1.7.2-1.fc24 #57

Open
sergiomb2 opened this issue May 14, 2016 · 4 comments
Open

building with jsoncpp-1.7.2-1.fc24 #57

sergiomb2 opened this issue May 14, 2016 · 4 comments

Comments

@sergiomb2
Copy link

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
Copy link
Author

./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 added a commit to UnitedRPMs/kodi-pvr-addons that referenced this issue May 15, 2016
to compile against jsoncpp-1.7.2-1.fc24 from Fedore proper
kodi-pvr/pvr.argustv#57
and remove the previous hack on jsoncpp.
- clean and retab spec file.
sergiomb2 added a commit to UnitedRPMs/kodi-pvr-addons that referenced this issue May 15, 2016
to compile against jsoncpp-1.7.2-1.fc24 from Fedore proper
kodi-pvr/pvr.argustv#57
and remove the previous hack on jsoncpp.
- clean and retab spec file.
@sergiomb2
Copy link
Author

ping

@craigscott-crascit
Copy link

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
Copy link
Author

the important part of my previous commits mention here

+##57
+find -name "FindJsonCpp.cmake" -exec sed -i 's/JSONCPP jsoncpp/JSONCPP json/g' {} ';'

+##57
+find -name "FindJsonCpp.cmake" -exec sed -i 's/JSONCPP jsoncpp/JSONCPP json/g' {} ';'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants