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