|
1 | 1 | #!/usr/bin/env python
|
2 | 2 |
|
3 |
| -import os |
4 |
| -import sys |
5 |
| - |
6 | 3 | env = SConscript("godot-cpp/SConstruct")
|
7 | 4 |
|
8 | 5 | env.Append(CPPPATH=["include/", "../include"])
|
| 6 | + |
9 | 7 | sources = Glob("include/*.cpp")
|
10 | 8 |
|
| 9 | +folder = "build/addons/RhythmGameUtilities" |
| 10 | + |
11 | 11 | if env["platform"] == "macos":
|
12 | 12 | file_name = "libRhythmGameUtilities.{}.{}".format(env["platform"], env["target"])
|
13 | 13 |
|
14 | 14 | library = env.SharedLibrary(
|
15 |
| - "build/addons/RhythmGameUtilities/{}.framework/{}".format(file_name, file_name), |
| 15 | + "{}/{}.framework/{}".format(folder, file_name, file_name), |
16 | 16 | source=sources
|
17 | 17 | )
|
18 | 18 | else:
|
19 | 19 | library = env.SharedLibrary(
|
20 |
| - "build/addons/RhythmGameUtilities/libRhythmGameUtilities{}{}" |
21 |
| - .format(env["suffix"], env["SHLIBSUFFIX"]), |
| 20 | + "{}/libRhythmGameUtilities{}{}" |
| 21 | + .format(folder, env["suffix"], env["SHLIBSUFFIX"]), |
22 | 22 | source=sources,
|
23 | 23 | )
|
24 | 24 |
|
25 | 25 | gdextension_copy = env.Command(
|
26 |
| - target="build/addons/RhythmGameUtilities/RhythmGameUtilities.gdextension", |
| 26 | + target="{}/RhythmGameUtilities.gdextension".format(folder), |
27 | 27 | source="RhythmGameUtilities.gdextension",
|
28 | 28 | action=Copy("$TARGET", "$SOURCE")
|
29 | 29 | )
|
30 | 30 |
|
31 | 31 | env.Depends(gdextension_copy, library)
|
32 | 32 |
|
| 33 | +CacheDir(".scons_cache/") |
| 34 | + |
33 | 35 | Default(library)
|
34 | 36 |
|
35 | 37 | Default(gdextension_copy)
|
0 commit comments