Moved from pkg-config

This commit is contained in:
Андреев Григорий 2024-08-16 22:23:14 +03:00
parent 57de9467f5
commit 87aec56169

View File

@ -6,7 +6,6 @@ struct TestWebsiteBuildScript {
/* Installation runlevel */ /* Installation runlevel */
BuildUnitsArray runlevel_2; BuildUnitsArray runlevel_2;
/* "debug" or "release" */
std::string build_type; std::string build_type;
bool make_tests = false; bool make_tests = false;
@ -34,11 +33,12 @@ struct TestWebsiteBuildScript {
return my_flag_collection; return my_flag_collection;
} }
TestWebsiteBuildScript(const std::string& _build_type, bool make_tests, explicit TestWebsiteBuildScript(const NormalCBuildSystemCommandMeaning& cmd){
const NormalCBuildSystemCommandMeaning& cmd) const char* BSCRIPT_TYPE = getenv("BSCRIPT_TYPE");
: build_type(_build_type), make_tests(make_tests) const char* BSCRIPT_TESTS = getenv("BSCRIPT_TESTS");
{ build_type = BSCRIPT_TYPE ? BSCRIPT_TYPE : "release";
ASSERT(build_type == "release" || build_type == "debug", "Unknown build type " + _build_type); make_tests = (bool)BSCRIPT_TESTS;
ASSERT(build_type == "release" || build_type == "debug", "Unknown build type");
std::vector<ExternalLibraryTarget> ext_targets; std::vector<ExternalLibraryTarget> ext_targets;
@ -70,10 +70,9 @@ struct TestWebsiteBuildScript {
for (std::string& u: T.exported_headers) for (std::string& u: T.exported_headers)
u = "jsonincpp/" + u; u = "jsonincpp/" + u;
T.installation_dir = ""; T.installation_dir = "";
T.pc_output_path = "libjsonincpp.pc";
my_targets.push_back(T); my_targets.push_back(T);
} }
if (make_tests) { CTarget T{"test0", "executable"}; if (make_tests) { CTarget T{"libjsonincpp_test0", "executable"};
T.additional_compilation_flags = getSomeRadFlags(); T.additional_compilation_flags = getSomeRadFlags();
T.proj_deps = {CTargetDependenceOnProjectsLibrary{"libjsonincpp"}}; T.proj_deps = {CTargetDependenceOnProjectsLibrary{"libjsonincpp"}};
T.units = {"tests/test0.cpp"}; T.units = {"tests/test0.cpp"};
@ -94,12 +93,7 @@ int main(int argc, char** argv) {
} }
NormalCBuildSystemCommandMeaning cmd; NormalCBuildSystemCommandMeaning cmd;
regular_bs_cli_cmd_interpret(args, cmd); regular_bs_cli_cmd_interpret(args, cmd);
const char* BS_SCRIPT_TYPE = getenv("BS_SCRIPT_TYPE"); TestWebsiteBuildScript bs(cmd);
const char* BS_SCRIPT_TESTS = getenv("BS_SCRIPT_TESTS");
TestWebsiteBuildScript bs(
BS_SCRIPT_TYPE ? BS_SCRIPT_TYPE : "release",
BS_SCRIPT_TESTS ? true : false,
cmd);
if (cmd.need_to_build) if (cmd.need_to_build)
complete_tasks_of_build_units(bs.runlevel_1); complete_tasks_of_build_units(bs.runlevel_1);
umask(~0755); umask(~0755);