SConscript 1.1 KB

1234567891011121314151617181920212223242526272829
  1. Import('env')
  2. env.Append(DPATH=['#source', '#source/app'])
  3. # OS-specific
  4. if env['PLATFORM'] == 'posix':
  5. env.Append(DVERSIONS=['PD_USE_MAGICK'])
  6. elif env['PLATFORM'] == 'darwin':
  7. if env['DC'] == 'dmd':
  8. env.Append(DLINKFLAGS=['-L-framework', '-LFoundation', '-L-framework', '-LImageIO'])
  9. elif env['DC'] == 'ldc' or env['DC'] == 'ldc2':
  10. # NOTE: LDC's support for Objective-C "is seriously lacking".
  11. # The below *should* work when it's better supported.
  12. # SEE: https://github.com/ldc-developers/ldc/issues/3907
  13. env.Append(DLINKFLAGS=['-L-framework', '-LFoundation', '-L-framework', '-LImageIO'])
  14. # I had wanted to change this so mlib and pd are compiled as
  15. # libraries, which are then embedded into pixiv_down, but
  16. # SCons doesn't seem to support that?
  17. mlib_files = SConscript('mlib/SConscript', exports='env')
  18. pd_files = SConscript('pd/SConscript', exports='env')
  19. pixiv_down_files = SConscript('app/SConscript', exports='env')
  20. env.Program('pixiv_down',
  21. mlib_files + pd_files + pixiv_down_files
  22. )
  23. env.Install(env['bindir'], 'pixiv_down')