#!/usr/bin/env python # SPDX-FileCopyrightText: 2020-2024 Leroy Hopson # 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", ]) 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)