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 {
58
58
});
59
59
zjolt .addIncludePath (b .path ("libs/JoltC" ));
60
60
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 (.{
64
65
.target = target ,
65
66
.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
+ }),
75
68
});
69
+
70
+ if (options .shared and target .result .os .tag == .windows )
71
+ joltc .root_module .addCMacro ("JPC_API" , "extern __declspec(dllexport)" );
72
+
76
73
b .installArtifact (joltc );
77
74
78
75
joltc .addIncludePath (b .path ("libs" ));
@@ -248,9 +245,11 @@ pub fn build(b: *std.Build) void {
248
245
249
246
const tests = b .addTest (.{
250
247
.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
+ }),
254
253
});
255
254
b .installArtifact (tests );
256
255
Original file line number Diff line number Diff line change 2
2
.name = .zphysics ,
3
3
.fingerprint = 0x1def6aac00c4909d ,
4
4
.version = "0.2.0-dev" ,
5
+ .minimum_zig_version = "0.14.1" ,
5
6
.paths = .{
6
7
"build.zig" ,
7
8
"build.zig.zon" ,
Original file line number Diff line number Diff line change @@ -741,7 +741,7 @@ class DebugRendererImpl final : public JPH::DebugRenderer
741
741
{
742
742
if (sInstance && sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch )
743
743
{
744
- sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch (sInstance ->c_renderer , c_primitive);
744
+ sInstance ->c_renderer ->vtbl ->DestroyTriangleBatch (sInstance ->c_renderer , ( void *) c_primitive);
745
745
}
746
746
}
747
747
Original file line number Diff line number Diff line change @@ -1060,7 +1060,7 @@ typedef struct JPC_DebugRendererVTable
1060
1060
1061
1061
// Optional
1062
1062
void
1063
- (*DestroyTriangleBatch)(void *in_self, const void *in_primitive);
1063
+ (*DestroyTriangleBatch)(void *in_self, void *in_primitive);
1064
1064
1065
1065
// Required, *cannot* be NULL.
1066
1066
void
You can’t perform that action at this time.
0 commit comments