Skip to content

Commit

Permalink
initial impl(#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Jan 28, 2024
1 parent 1714046 commit f17c3e6
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ docs.json
__dummy.html
docs/
*.selections.json
build/

# Code coverage
*.lst

# Zig build
zig-*/

#VScode
# VScode
.vscode/
53 changes: 53 additions & 0 deletions dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name "sokol-d"
description "D bindings for sokol"
authors "Matheus Catarino França <[email protected]>"
copyright "Copyright 2023-2024 - Matheus Catarino França"
license "Zlib"
version "0.1.0"
buildType "debug" {
buildOptions "debugMode" "debugInfo"
}
buildType "unittest" {
buildOptions "debugMode" "debugInfo" "unittests"
}
buildType "release" {
buildOptions "releaseMode" "inline" "optimize"
}
buildType "release-nobounds" {
buildOptions "releaseMode" "inline" "noBoundsCheck" "optimize"
}
buildType "release-debug" {
buildOptions "releaseMode" "debugInfo" "inline" "optimize"
}
toolchainRequirements dmd=">=2.89.0" ldc=">=1.25.0" gdc=">=9.3.0"
lflags "-L-Lzig-out/lib" "-L-lsokol"
sourcePaths "src"
preBuildCommands "zig build -Dshared -Doptimize=ReleaseFast"
configuration "linux" {
targetType "executable"
targetPath "build/linux"
targetName "sokol-d-example-clear"
dflags "-P-DSOKOL_GLCORE33" platform="linux"
libs "X11" "GL" "asound" "Xi" "Xcursor" platform="linux"
sourceFiles "src/examples/clear.d"
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"
}
configuration "osx" {
targetType "executable"
targetPath "build/osx"
targetName "sokol-d-example-clear"
dflags "-P-DSOKOL_METAL" "-Xcc=-ObjC" "-P-DIMPL" platform="osx"
lflags "-ld_classic" platform="osx"
libs "Cocoa" "QuartzCore" "MetalKit" "Metal" "AudioToolbox" "Foundation" platform="osx"
sourceFiles "src/examples/clear.d"
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"
}
configuration "windows" {
targetType "executable"
targetPath "build/windows"
targetName "sokol-d-example-clear"
dflags "-P-DSOKOL_D3D11" platform="windows"
libs "kernel32" "user32" "ole32" "gdi32" "d3d11" "dxgi" platform="windows"
sourceFiles "src/examples/clear.d"
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"
}

0 comments on commit f17c3e6

Please sign in to comment.