From dfc45729d342f6f4d4d9ea39649c49b49fa178c6 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Wed, 29 Oct 2025 16:39:14 +0100 Subject: Initial commit --- kel_cpp_boilerplate/c++/blueprints/sconscript.hpp | 41 +++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 kel_cpp_boilerplate/c++/blueprints/sconscript.hpp (limited to 'kel_cpp_boilerplate/c++/blueprints/sconscript.hpp') diff --git a/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp b/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp new file mode 100644 index 0000000..e1c8c8b --- /dev/null +++ b/kel_cpp_boilerplate/c++/blueprints/sconscript.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include + +constexpr std::string_view sconscript_dir_name = "app/c++"; +constexpr std::string_view sconscript_file_name = "SConscript"; + +constexpr std::string_view sconscript_file_content = R"( +#!/bin/false + +import os +import os.path +import glob + + +Import('env') + +dir_path = Dir('.').abspath + +# Environment for base library +program_env = env.Clone(); + +program_env.sources = sorted(glob.glob(dir_path + "/*.cpp")) +program_env.headers = sorted(glob.glob(dir_path + "/*.hpp")) + +env.sources += program_env.sources; +env.headers += program_env.headers; + +## Static lib +objects_static = [] +program_env.add_source_files(objects_static, program_env.sources, shared=False); +env.binary = program_env.Program('#build/kel_cpp_boilerplate', [objects_static]); + +# Set Alias +env.Alias('binary', [env.binary]); + +env.targets += ['binary']; + +# Install +env.Install('$prefix/bin/', [env.binary]); +)"; -- cgit v1.2.3