diff options
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]); +)"; |
