###################################################################### # Cereal library build script # # Only 'hpp' is used by Iotivity, it's unnecessary to build it ###################################################################### import os Import('env') src_dir = env.get('SRC_DIR') # In the pass, cereal library is in extlibs/cereal, according to external # library management rule, cereal should be put in extlibs/cereal/cereal. # jenkins of gerrit server, still follow the old, to avoid jenkins fail # both places are handled. old = os.path.join(src_dir, 'extlibs', 'cereal', 'include') cur = os.path.join(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): 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: ************************************ * 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: print 'Download cereal library complete' env.AppendUnique(CPPPATH = [old, cur])