endbasic-sdl 0.14.0

The EndBASIC programming language - SDL graphical console
Documentation
// EndBASIC
// Copyright 2026 Julio Merino
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

//! Build-time settings for SDL builds.

fn main() {
    // When compiling with the bundled SDL library, we place the libSDL2.so
    // file within the distribution zip.  Make sure EndBASIC can find it at
    // runtime.
    if std::env::var_os("CARGO_FEATURE_BUNDLED").is_some()
        && std::env::var("CARGO_CFG_TARGET_OS").as_deref() == Ok("linux")
    {
        println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN");
    }
}