diff --git a/meson.build b/meson.build index 872c85d4..157ba06b 100644 --- a/meson.build +++ b/meson.build @@ -319,7 +319,7 @@ foreach file : imsrc sources += 'source/thirdparty/imgui' / file sources += 'source/qjs_imgui.cpp' endforeach - + srceng = 'source' tp = srceng / 'thirdparty' includes = [ @@ -383,6 +383,20 @@ cell = custom_target('cell', install_dir: get_option('bindir') ) +# Install headers for building dynamic libraries using Cell +install_headers('source/cell.h', 'source/jsffi.h') +install_headers('source/blob.h') +install_headers('source/quickjs.h') +install_headers('source/qjs_macros.h') +install_headers('source/qjs_blob.h') +install_headers('source/qjs_common.h') +install_headers('source/qjs_actor.h') +install_headers('source/qjs_fd.h') +install_headers('source/qjs_os.h') +install_headers('source/qjs_time.h') +install_headers('source/HandmadeMath.h') +install_headers('source/render.h') + tests = [ 'spawn_actor', 'empty', diff --git a/source/jsffi.h b/source/jsffi.h index b03f0d9b..96cfd43c 100644 --- a/source/jsffi.h +++ b/source/jsffi.h @@ -4,7 +4,6 @@ #include "cell.h" #include "HandmadeMath.h" #include "render.h" -#include "stb_ds.h" #define JS_SetProperty(js, tar, str, val) JS_SetPropertyStr(js, tar, #str, val) #define JS_GetProperty(js, tar, atom) JS_GetPropertyStr(js, tar, #atom) diff --git a/source/qjs_transform.c b/source/qjs_transform.c index 260dbf9b..a44ca013 100644 --- a/source/qjs_transform.c +++ b/source/qjs_transform.c @@ -1,6 +1,7 @@ #include "qjs_transform.h" #include "jsffi.h" #include "qjs_macros.h" +#include "stb_ds.h" #include "transform.h" #include "HandmadeMath.h" diff --git a/source/render.h b/source/render.h index 6064418a..41baf220 100644 --- a/source/render.h +++ b/source/render.h @@ -45,10 +45,6 @@ typedef struct rgba rgba; typedef HMM_Vec4 rgbaf; typedef HMM_Vec4 colorf; -static inline rgba vec2rgba(HMM_Vec4 v) { - return (rgba){v.e[0]*255,v.e[1]*255,v.e[2]*255,v.e[3]*255}; -} - // rectangles are always defined with [x,y] in the bottom left typedef SDL_FRect rect; typedef SDL_Rect irect;