SCsub 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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["steamapi"] and env.editor_build:
  8. env_main.Append(CPPDEFINES=["STEAMAPI_ENABLED"])
  9. if env["tests"]:
  10. env_main.Append(CPPDEFINES=["TESTS_ENABLED"])
  11. env_main.Depends("#main/splash.gen.h", "#main/splash.png")
  12. env_main.CommandNoCache(
  13. "#main/splash.gen.h",
  14. "#main/splash.png",
  15. env.Run(main_builders.make_splash),
  16. )
  17. if env_main.editor_build and not env_main["no_editor_splash"]:
  18. env_main.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
  19. env_main.CommandNoCache(
  20. "#main/splash_editor.gen.h",
  21. "#main/splash_editor.png",
  22. env.Run(main_builders.make_splash_editor),
  23. )
  24. env_main.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
  25. env_main.CommandNoCache(
  26. "#main/app_icon.gen.h",
  27. "#main/app_icon.png",
  28. env.Run(main_builders.make_app_icon),
  29. )
  30. lib = env_main.add_library("main", env.main_sources)
  31. env.Prepend(LIBS=[lib])