diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-29 16:39:14 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2025-10-29 16:39:14 +0100 |
| commit | dfc45729d342f6f4d4d9ea39649c49b49fa178c6 (patch) | |
| tree | fd66c76073b0eff3f184e1dcaa612c9e73eb7efd /kel_cpp_boilerplate/c++/blueprints/sconscript.hpp | |
| download | apps-dev_tools-dfc45729d342f6f4d4d9ea39649c49b49fa178c6.tar.gz | |
Initial commit
Diffstat (limited to 'kel_cpp_boilerplate/c++/blueprints/sconscript.hpp')
| -rw-r--r-- | kel_cpp_boilerplate/c++/blueprints/sconscript.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
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 <string_view> + +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]); +)"; |
