allow installing headers for cell mods
This commit is contained in:
16
meson.build
16
meson.build
@@ -319,7 +319,7 @@ foreach file : imsrc
|
|||||||
sources += 'source/thirdparty/imgui' / file
|
sources += 'source/thirdparty/imgui' / file
|
||||||
sources += 'source/qjs_imgui.cpp'
|
sources += 'source/qjs_imgui.cpp'
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
srceng = 'source'
|
srceng = 'source'
|
||||||
tp = srceng / 'thirdparty'
|
tp = srceng / 'thirdparty'
|
||||||
includes = [
|
includes = [
|
||||||
@@ -383,6 +383,20 @@ cell = custom_target('cell',
|
|||||||
install_dir: get_option('bindir')
|
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 = [
|
tests = [
|
||||||
'spawn_actor',
|
'spawn_actor',
|
||||||
'empty',
|
'empty',
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
#include "cell.h"
|
#include "cell.h"
|
||||||
#include "HandmadeMath.h"
|
#include "HandmadeMath.h"
|
||||||
#include "render.h"
|
#include "render.h"
|
||||||
#include "stb_ds.h"
|
|
||||||
|
|
||||||
#define JS_SetProperty(js, tar, str, val) JS_SetPropertyStr(js, tar, #str, val)
|
#define JS_SetProperty(js, tar, str, val) JS_SetPropertyStr(js, tar, #str, val)
|
||||||
#define JS_GetProperty(js, tar, atom) JS_GetPropertyStr(js, tar, #atom)
|
#define JS_GetProperty(js, tar, atom) JS_GetPropertyStr(js, tar, #atom)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "qjs_transform.h"
|
#include "qjs_transform.h"
|
||||||
#include "jsffi.h"
|
#include "jsffi.h"
|
||||||
#include "qjs_macros.h"
|
#include "qjs_macros.h"
|
||||||
|
#include "stb_ds.h"
|
||||||
|
|
||||||
#include "transform.h"
|
#include "transform.h"
|
||||||
#include "HandmadeMath.h"
|
#include "HandmadeMath.h"
|
||||||
|
|||||||
@@ -45,10 +45,6 @@ typedef struct rgba rgba;
|
|||||||
typedef HMM_Vec4 rgbaf;
|
typedef HMM_Vec4 rgbaf;
|
||||||
typedef HMM_Vec4 colorf;
|
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
|
// rectangles are always defined with [x,y] in the bottom left
|
||||||
typedef SDL_FRect rect;
|
typedef SDL_FRect rect;
|
||||||
typedef SDL_Rect irect;
|
typedef SDL_Rect irect;
|
||||||
|
|||||||
Reference in New Issue
Block a user