SCsub 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env python
  2. Import("env")
  3. import main_builders
  4. env.main_sources = []
  5. env_main = env.Clone()
  6. env_main.add_source_files(env.main_sources, "*.cpp")
  7. if env["tests"]:
  8. env_main.Append(CPPDEFINES=["TESTS_ENABLED"])
  9. env_main.Depends("#main/splash.gen.h", "#main/splash.png")
  10. env_main.CommandNoCache(
  11. "#main/splash.gen.h",
  12. "#main/splash.png",
  13. env.Run(main_builders.make_splash, "Building splash screen header."),
  14. )
  15. if not env_main["no_editor_splash"]:
  16. env_main.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
  17. env_main.CommandNoCache(
  18. "#main/splash_editor.gen.h",
  19. "#main/splash_editor.png",
  20. env.Run(main_builders.make_splash_editor, "Building editor splash screen header."),
  21. )
  22. env_main.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
  23. env_main.CommandNoCache(
  24. "#main/app_icon.gen.h",
  25. "#main/app_icon.png",
  26. env.Run(main_builders.make_app_icon, "Building application icon."),
  27. )
  28. lib = env_main.add_library("main", env.main_sources)
  29. env.Prepend(LIBS=[lib])