godot-xterm/addons/godot_xterm/native/SConstruct

40 lines
1 KiB
Python
Raw Normal View History

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