work on physics begun
This commit is contained in:
38
rapier/build.cpp
Normal file
38
rapier/build.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
#include "helper.h"
|
||||
#include "c.h"
|
||||
#include "ld.h"
|
||||
#include "tier1/utlstring.h"
|
||||
|
||||
|
||||
CUtlString rapier_lib;
|
||||
DECLARE_BUILD_STAGE(rapier)
|
||||
{
|
||||
Target_t target = Target_t::DefaultTarget();
|
||||
target.abi = TARGET_ABI_GNU;
|
||||
CUtlString szTarget = target.GetTriplet();
|
||||
if (CommandLine()->CheckParam("-norust"))
|
||||
return 0;
|
||||
rapier_lib = CUtlString("rapier/target/%s/release/librapier_rtt.a",szTarget.GetString());
|
||||
V_printf("%s\n",rapier_lib.GetString());
|
||||
CUtlVector<CUtlString> cargo_args = {
|
||||
"build",
|
||||
"--release",
|
||||
"--target",
|
||||
szTarget
|
||||
};
|
||||
runner->Run("cargo", "rapier", cargo_args);
|
||||
runner->Wait();
|
||||
|
||||
CUtlVector<CUtlString> cbindgen_args = {
|
||||
"--config",
|
||||
"cbindgen.toml",
|
||||
"--crate",
|
||||
"rapier_rtt",
|
||||
"--output",
|
||||
"../public/physics_gen.h",
|
||||
};
|
||||
runner->Run("cbindgen", "rapier", cbindgen_args);
|
||||
runner->Wait();
|
||||
|
||||
return 0;
|
||||
};
|
||||
Reference in New Issue
Block a user