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