1 ######################################################################
2 # Cereal library build script
4 # Only 'hpp' is used by Iotivity, it's unnecessary to build it
5 ######################################################################
10 src_dir = env.get('SRC_DIR')
12 # In the pass, cereal library is in extlibs/cereal, according to external
13 # library management rule, cereal should be put in extlibs/cereal/cereal.
14 # jenkins of gerrit server, still follow the old, to avoid jenkins fail
15 # both places are handled.
16 old = os.path.join(src_dir, 'extlibs', 'cereal', 'include')
17 cur = os.path.join(src_dir, 'extlibs', 'cereal', 'cereal', 'include')
19 # check 'cereal' library, if it doesn't exits, ask user to download it
20 if not os.path.exists(old) and not os.path.exists(cur):
21 cereal_env = Environment(ENV = os.environ)
22 c = cereal_env.Action(['git clone https://github.com/USCiLab/cereal.git cereal',
23 'cd cereal && git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 && git apply ../../../resource/patches/cereal_gcc46.patch',
26 print 'Downloading cereal library ...'
27 if cereal_env.Execute(c):
29 *********************************** Error: ************************************
30 * Please download cereal and apply the patch as following: *
31 * $ git clone https://github.com/USCiLab/cereal.git extlibs/cereal/cereal *
32 * $ cd extlibs/cereal/cereal *
33 * $ git reset --hard 7121e91e6ab8c3e6a6516d9d9c3e6804e6f65245 *
34 * $ git apply ../../../resource/patches/cereal_gcc46.patch *
35 *******************************************************************************
39 print 'Download cereal library complete'
41 env.AppendUnique(CPPPATH = [old, cur])