M _project.sc +1 -0
@@ 1,2 1,3 @@
import .lib.tukan.use
+
M lib/tukan/core.sc +2 -2
@@ 3,9 3,9 @@ using import .globals
if (operating-system == 'windows)
load-library
- library-dir .. "/tukan_core.dll"
+ find-library "tukan_core.dll"
else
load-library
- library-dir .. "/libtukan_core.so"
+ find-library "libtukan_core.so"
none
M lib/tukan/gl.sc +0 -1
@@ 14,7 14,6 @@ using import chaining
vvv bind _GL
include "glad.h"
- options "-I" include-dir "-I" (include-dir .. "/glad")
fn translate-gl-symbols (scope source)
fold (GL = scope) for k v in source
M lib/tukan/globals.sc +3 -3
@@ 3,11 3,11 @@ let base-dir =
.. module-dir "/../.."
let
- library-dir =
+ #library-dir =
.. base-dir "/lib"
- include-dir =
+ #include-dir =
.. base-dir "/include"
- cdefs-dir =
+ #cdefs-dir =
.. base-dir "/cdefs"
assets-dir =
.. base-dir "/share/tukan"
M lib/tukan/imgui/cimgui.sc +0 -2
@@ 5,8 5,6 @@ using import ..globals
vvv bind lib
include
options
- \ "-I" cdefs-dir
- \ "-I" include-dir
\ "-DIMGUI_DISABLE_INCLUDE_IMCONFIG_H"
""""
//#include "imgui.h"
M lib/tukan/sdl.sc +1 -2
@@ 5,13 5,12 @@ if (operating-system == 'windows)
load-library "SDL2.dll"
else
load-library
- library-dir .. "/libSDL2-2.0.so.0"
+ find-library "libSDL2-2.0.so.0"
run-stage;
vvv bind SDL
include
- options "-I" cdefs-dir "-I" include-dir
""""#include <stdbool.h>
#include "SDL2/SDL.h"
#include "SDL2/SDL_syswm.h"
M lib/tukan/use.sc +5 -0
@@ 3,3 3,8 @@
.. module-dir "/../?.sc"
.. module-dir "/../?/init.sc"
package.path
+'define-symbol package 'include-path
+ cons
+ .. module-dir "/../../cdefs"
+ .. module-dir "/../../include/glad"
+ package.include-path