File tree Expand file tree Collapse file tree 5 files changed +676
-1038
lines changed Expand file tree Collapse file tree 5 files changed +676
-1038
lines changed Original file line number Diff line number Diff line change @@ -58,21 +58,18 @@ pub fn build(b: *std.Build) void {
5858 });
5959 zjolt .addIncludePath (b .path ("libs/JoltC" ));
6060
61- const joltc = if (options .shared ) blk : {
62- const lib = b .addSharedLibrary (.{
63- .name = "joltc" ,
61+ const joltc = b .addLibrary (.{
62+ .name = "joltc" ,
63+ .linkage = if (options .shared ) .dynamic else .static ,
64+ .root_module = b .createModule (.{
6465 .target = target ,
6566 .optimize = optimize ,
66- });
67- if (target .result .os .tag == .windows ) {
68- lib .root_module .addCMacro ("JPC_API" , "extern __declspec(dllexport)" );
69- }
70- break :blk lib ;
71- } else b .addStaticLibrary (.{
72- .name = "joltc" ,
73- .target = target ,
74- .optimize = optimize ,
67+ }),
7568 });
69+
70+ if (options .shared and target .result .os .tag == .windows )
71+ joltc .root_module .addCMacro ("JPC_API" , "extern __declspec(dllexport)" );
72+
7673 b .installArtifact (joltc );
7774
7875 joltc .addIncludePath (b .path ("libs" ));
@@ -248,9 +245,11 @@ pub fn build(b: *std.Build) void {
248245
249246 const tests = b .addTest (.{
250247 .name = "zphysics-tests" ,
251- .root_source_file = b .path ("src/zphysics.zig" ),
252- .target = target ,
253- .optimize = optimize ,
248+ .root_module = b .createModule (.{
249+ .root_source_file = b .path ("src/zphysics.zig" ),
250+ .target = target ,
251+ .optimize = optimize ,
252+ }),
254253 });
255254 b .installArtifact (tests );
256255
Original file line number Diff line number Diff line change 22 .name = .zphysics ,
33 .fingerprint = 0x1def6aac00c4909d ,
44 .version = "0.2.0-dev" ,
5+ .minimum_zig_version = "0.14.1" ,
56 .paths = .{
67 "build.zig" ,
78 "build.zig.zon" ,
Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ class DebugRendererImpl final : public JPH::DebugRenderer
741741 {
742742 if (sInstance && sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch )
743743 {
744- sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch (sInstance ->c_renderer , c_primitive);
744+ sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch (sInstance ->c_renderer , ( void *) c_primitive);
745745 }
746746 }
747747
Original file line number Diff line number Diff line change @@ -1060,7 +1060,7 @@ typedef struct JPC_DebugRendererVTable
10601060
10611061 // Optional
10621062 void
1063- (*DestroyTriangleBatch)(void *in_self, const void *in_primitive);
1063+ (*DestroyTriangleBatch)(void *in_self, void *in_primitive);
10641064
10651065 // Required, *cannot* be NULL.
10661066 void
You can’t perform that action at this time.
0 commit comments