SConscript 792 B

123456789101112131415161718192021222324252627
  1. from building import *
  2. import rtconfig
  3. # get current directory
  4. cwd = GetCurrentDir()
  5. # The set of source files associated with this SConscript file.
  6. src = Glob('src/*.c')
  7. if GetDepend('PROTOBUF_C_USING_EXAMPLE'):
  8. src += Glob('examples/amessage.pb-c.c')
  9. if GetDepend('PROTOBUF_C_USING_ENCODE_DECODE_EXAMPLE'):
  10. src += Glob('examples/amessage_encode_decode.c')
  11. if GetDepend('PROTOBUF_C_USING_ENCODE_DECODE_FILE_EXAMPLE'):
  12. src += Glob('examples/amessage_encode_to_file.c')
  13. src += Glob('examples/amessage_decode_from_file.c')
  14. path = [cwd + '/src']
  15. path += [cwd + '/examples']
  16. LOCAL_CCFLAGS = ''
  17. group = DefineGroup('protobuf-c', src, depend = ['PKG_USING_PROTOBUF_C'], CPPPATH = path, LOCAL_CCFLAGS = LOCAL_CCFLAGS)
  18. Return('group')