SCsub 1.1 KB

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