add meson build

This commit is contained in:
2024-10-22 13:06:51 -05:00
parent 19abf1888d
commit 7b3b6c1bd2
2 changed files with 18 additions and 2 deletions

16
meson.build Normal file
View File

@@ -0,0 +1,16 @@
project('quickjs', 'c')
cc = meson.get_compiler('c')
m_dep = cc.find_library('m', required:false)
add_project_arguments('-DCONFIG_VERSION="2024-02-14"', language : 'c')
add_project_arguments('-DCONFIG_BIGNUM', language : 'c')
lib_sources = ['libbf.c', 'libregexp.c', 'quickjs.c', 'libunicode.c', 'cutils.c','quickjs-libc.c']
libquickjs = library('quickjs',
lib_sources,
dependencies: m_dep
)
quickjs_dep = declare_dependency(link_with: libquickjs, include_directories: include_directories('.'), dependencies: m_dep)

View File

@@ -47,11 +47,11 @@
#include <sys/ioctl.h>
#include <sys/wait.h>
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__linux__)
extern char **environ;
#endif
#if defined(__APPLE__) || defined(__FreeBSD__)
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__linux__)
typedef sig_t sighandler_t;
#endif