forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSCsub
More file actions
30 lines (21 loc) · 859 Bytes
/
Copy pathSCsub
File metadata and controls
30 lines (21 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python
from misc.utility.scons_hints import *
from glob import glob
import platform_builders
Import("env")
env.platform_sources = []
# Generate export icons
for platform in env.platform_exporters:
for path in glob(f"{platform}/export/*.svg"):
env.CommandNoCache(path.replace(".svg", "_svg.gen.h"), path, env.Run(platform_builders.export_icon_builder))
# Register platform-exclusive APIs
register_platform_apis = env.CommandNoCache(
"register_platform_apis.gen.cpp",
env.Value(env.platform_apis),
env.Run(platform_builders.register_platform_apis_builder),
)
env.add_source_files(env.platform_sources, register_platform_apis)
for platform in env.platform_apis:
env.add_source_files(env.platform_sources, f"{platform}/api/*.cpp")
lib = env.add_library("platform", env.platform_sources)
env.Prepend(LIBS=[lib])