-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSConstruct
More file actions
29 lines (21 loc) · 767 Bytes
/
Copy pathSConstruct
File metadata and controls
29 lines (21 loc) · 767 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
#!/usr/bin/env python3
import os
from SCons.Script import Default, Exit, SConscript
godot_cpp_dir = os.environ.get("GODOT_CPP_DIR", "../cpp_libs/godot-cpp")
godot_cpp_sconstruct = os.path.join(godot_cpp_dir, "SConstruct")
if not os.path.exists(godot_cpp_sconstruct):
print(f"Error: godot-cpp not found at {godot_cpp_dir}")
print("Please set GODOT_CPP_DIR environment variable or check your paths.")
Exit(1)
env = SConscript(godot_cpp_sconstruct)
if env["platform"] == "linux":
env['MAXLINELENGTH'] = 8192
lib_name = "the_wait_cpp"
sources = env.Glob("src/*.cpp")
env.Append(CPPPATH=["src/"])
target_path = "../bin/{}{}".format(lib_name, env["suffix"])
library = env.SharedLibrary(
target=target_path,
source=sources,
)
Default(library)