From: Caiwen Zhang Date: Thu, 12 Feb 2015 05:30:43 +0000 (+0800) Subject: Add auto download cereal library support X-Git-Tag: 1.2.0+RC1~1938 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f1a2e9c0cce7a9b0d2a3f3a90ef60d9d3ca964c;p=platform%2Fupstream%2Fiotivity.git Add auto download cereal library support Change-Id: Iab0fe5ca9c64849d215dfcf1ec99a4f834cb26f8 Signed-off-by: Caiwen Zhang Reviewed-on: https://gerrit.iotivity.org/gerrit/328 Tested-by: jenkins-iotivity Reviewed-by: Sashi Penta Reviewed-by: Patrick Lankswert --- diff --git a/extlibs/cereal/SConscript b/extlibs/cereal/SConscript index 7f3e1f8..6945131 100644 --- a/extlibs/cereal/SConscript +++ b/extlibs/cereal/SConscript @@ -18,16 +18,24 @@ cur = src_dir + '/extlibs/cereal/cereal/include' # check 'cereal' library, if it doesn't exits, ask user to download it if not os.path.exists(old) and not os.path.exists(cur): - print ''' + cereal_env = Environment(ENV = os.environ) + c = cereal_env.Action(['git clone https://github.com/USCiLab/cereal.git cereal', + 'cd cereal && git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 && git apply ../../../resource/patches/cereal_gcc46.patch', + ]) + + print 'Downloading cereal library ...' + if cereal_env.Execute(c): + print ''' *********************************** Error: ************************************ -* 'Cereal' library doesn't exist. please download cereal to extlibs directory* -* add apply the patch as following: * +* Please download cereal and apply the patch as following: * * $ git clone https://github.com/USCiLab/cereal.git extlibs/cereal/cereal * * $ cd extlibs/cereal/cereal * * $ git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 * * $ git apply ../../../resource/patches/cereal_gcc46.patch * ******************************************************************************* ''' - Exit(1) -else: - env.AppendUnique(CPPPATH = [old, cur]) + Exit(1) + else: + print 'Download cereal library complete' + +env.AppendUnique(CPPPATH = [old, cur])