2020-11-05 09:42:00 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
2024-02-06 12:01:14 +01:00
|
|
|
# SPDX-FileCopyrightText: 2020-2024 Leroy Hopson <godot-xterm@leroy.nix.nz>
|
2023-01-25 19:12:07 +01:00
|
|
|
# SPDX-License-Identifier: MIT
|
2020-11-05 09:42:00 +01:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
2024-02-06 12:01:14 +01:00
|
|
|
env = SConscript("thirdparty/godot-cpp/SConstruct")
|
2023-01-25 19:12:07 +01:00
|
|
|
env['ENV'] = os.environ
|
2020-07-11 12:45:21 +02:00
|
|
|
|
2024-02-06 12:01:14 +01:00
|
|
|
VariantDir('build', 'src', duplicate=0)
|
|
|
|
env['OBJPREFIX'] = os.path.join('build', '')
|
2020-07-11 12:45:21 +02:00
|
|
|
|
2020-11-05 09:42:00 +01:00
|
|
|
env.Append(CPPPATH=[
|
2024-02-06 12:01:14 +01:00
|
|
|
"thirdparty/libtsm/src/tsm",
|
|
|
|
"thirdparty/libtsm/external",
|
|
|
|
"thirdparty/libtsm/src/shared",
|
2020-11-05 09:42:00 +01:00
|
|
|
])
|
2021-06-07 08:53:43 +02:00
|
|
|
|
2024-02-06 12:01:14 +01:00
|
|
|
sources = Glob("src/*.cpp") + Glob("thirdparty/libtsm/src/tsm/*.c")
|
2023-01-25 19:12:07 +01:00
|
|
|
sources.append([
|
|
|
|
'thirdparty/libtsm/external/wcwidth/wcwidth.c',
|
|
|
|
'thirdparty/libtsm/src/shared/shl-htable.c',
|
2020-11-05 09:42:00 +01:00
|
|
|
])
|
|
|
|
|
2024-02-06 12:01:14 +01:00
|
|
|
if env["platform"] == "macos":
|
|
|
|
library = env.SharedLibrary(
|
|
|
|
"bin/libgodot-xterm.{}.{}.framework/libgodot-xterm.{}.{}".format(
|
|
|
|
env["platform"], env["target"], env["platform"], env["target"]
|
|
|
|
),
|
|
|
|
source=sources,
|
|
|
|
)
|
2021-07-07 16:26:48 +02:00
|
|
|
else:
|
2024-02-06 12:01:14 +01:00
|
|
|
library = env.SharedLibrary(
|
|
|
|
"bin/libgodot-xterm{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
|
|
|
|
source=sources,
|
|
|
|
)
|
2023-01-25 19:12:07 +01:00
|
|
|
|
2020-11-05 09:42:00 +01:00
|
|
|
Default(library)
|