Skip to content

Commit

Permalink
fix: windows linking
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 28, 2024
1 parent 0cf1b57 commit 9ad2b4e
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions dub.sdl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/clear.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/triangle.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -42,7 +44,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/sgl_context.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/clear.d" "src/examples/triangle.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -51,7 +55,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/debugtext_print.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/triangle.d" "src/examples/saudio.d" "src/examples/clear.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -60,7 +66,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/triangle.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -69,7 +77,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/blend.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/triangle.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -78,7 +88,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/saudio.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/triangle.d" "src/examples/debugtext_print.d" "src/examples/mrt.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -87,7 +99,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/mrt.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/triangle.d" "src/examples/user_data.d" "src/examples/cube.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -96,7 +110,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/cube.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/triangle.d" "src/examples/user_data.d" "src/examples/mrt.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}
Expand All @@ -105,7 +121,9 @@ subPackage {
targetType "executable"
targetPath "build"
sourceFiles "src/examples/user_data.d"
lflags "-Lzig-out/lib" "-lsokol"
libs "sokol"
lflags "-Lzig-out/lib" platform="posix"
ldflags "/LIBPATH:zig-out/lib" platform="windows"
excludedSourceFiles "src/examples/sgl_context.d" "src/examples/clear.d" "src/examples/saudio.d" "src/examples/debugtext_print.d" "src/examples/triangle.d" "src/examples/cube.d" "src/examples/mrt.d" "src/examples/blend.d" "src/shaders/*.d"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
}

0 comments on commit 9ad2b4e

Please sign in to comment.