سؤال

I am trying to include the libjsoncpp package into my Yocto build, which is not currently included in Yocto's package list. I downloaded the source files from http://sourceforge.net/projects/jsoncpp/files/jsoncpp/. The package does not come with an INSTALL script but instead uses scons.py. How can I write the install script for this as a recipe?

Thanks

هل كانت مفيدة؟

المحلول

I downloaded the jsoncpp-src-0.6.0-rc2.tar from that link and didnt see any scons.py, even though the README says it should be there. I did however look through the SConstruct included therein, which is the main SCons build script.

To be able to use it, you will need to (obviously :) ) install Python and SCons, as indicated in the README: (I would recommend the latest version of SCons, which is 2.3.0, hopefully its compatible)

  • Building/Testing: =================

JsonCpp uses Scons (http://www.scons.org) as a build system. Scons requires python to be installed (http://www.python.org).

You download scons-local distribution from the following url: http://sourceforge.net/projects/scons/files/scons-local/1.2.0/

Unzip it in the directory where you found this README file. scons.py Should be at the same level as README.

python scons.py platform=PLTFRM [TARGET]

You should then be able to invoke scons from your scripts as follows:

$ scons -f <path to json>/SConstruct platform=linux-gcc

Substitute linux-gcc with your platform. Read through the SConstruct and search for platform to see all the possibilities.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top