about summary refs log tree commit diff stats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-22 23:19:21 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-22 23:21:42 +0200
commitfd8f6d7d127b088656aff0d49c6ae4623d8de8bb (patch)
tree776a641ab3c72280eb89b3da6ef28571c7f15ca6 /src/bindings
parent599d49698f860cdfec5d1774a8bd63c66970571d (diff)
downloadchawan-fd8f6d7d127b088656aff0d49c6ae4623d8de8bb.tar.gz
Include QuickJS sources in the repository
Taken from txiki.js, so it includes zamofex's top-level await patch.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/quickjs.nim19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index 9a76a484..7c1370a9 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -1,20 +1,5 @@
-import os
-
-const javascriptDirs = ["/usr/local/lib", "/usr/local", "/usr/lib", "/usr", "/lib"]
-const lib = (func(): string =
-  when defined(posix):
-    for dir in javascriptDirs:
-      for dir in @[dir, dir / "quickjs"]:
-        if fileExists(dir / "libquickjs.a"):
-          return dir
-)()
-const hlib = (func(): string =
-  when defined(posix):
-    for dir in javascriptDirs:
-      for dir in @[dir / "include", dir / "include" / "quickjs"]:
-        if fileExists(dir / "quickjs.h"):
-          return dir
-)()
+const lib = "lib/"
+const hlib = "lib/"
 const qjsheader = "<quickjs/quickjs.h>"
 
 when lib != "":