-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxmake.lua
More file actions
79 lines (63 loc) · 2.14 KB
/
xmake.lua
File metadata and controls
79 lines (63 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
add_rules("mode.debug", "mode.release")
set_languages("cxx23")
add_requires("quickjs-ng 0.14.0")
add_requires("catch2 3.x")
add_requires("raylib 5.5")
add_includedirs("include")
task("amalgamate")
on_run(function ()
-- Use the system python (or the one from your venv)
local python = is_host("windows") and ".venv/Scripts/python.exe" or "python3"
local entry = "src/qjswrapper.hpp"
local output = "include/qjswrapper.hpp"
local script = "tools/amalgamate.py"
print("Running custom amalgamation script...")
-- Arguments: script_path, entry_file, output_file, include_directory
os.execv(python, {script, entry, output, "src"})
end)
set_menu {
usage = "xmake amalgamate",
description = "Generate a single header file for qjswrapper.",
}
target("qjswrapper")
set_kind("headeronly")
add_headerfiles("include/(qjswrapper.hpp)")
add_packages("quickjs", {public = true})
target("unit-tests")
set_kind("binary")
add_packages("catch2")
add_packages("quickjs-ng")
add_files("tests/*.cpp")
target("example_object")
set_kind("binary")
add_files("examples/example_object.cpp")
add_packages("quickjs-ng")
target("example_class")
set_kind("binary")
add_files("examples/example_class.cpp")
add_packages("quickjs-ng")
target("example_demo")
set_kind("binary")
add_files("examples/example_demo.cpp")
add_packages("quickjs-ng")
target("example_module")
set_kind("binary")
add_files("examples/example_module.cpp")
add_packages("quickjs-ng")
target("example_bytecode")
set_kind("binary")
add_files("examples/example_bytecode.cpp")
add_packages("quickjs-ng")
target("example_error_global")
set_kind("binary")
add_files("examples/example_error_global.cpp")
add_packages("quickjs-ng")
target("example_error_module")
set_kind("binary")
add_files("examples/example_error_module.cpp")
add_packages("quickjs-ng")
target("example_raylib")
set_kind("binary")
add_files("examples/example_raylib.cpp")
add_packages("quickjs-ng")
add_packages("raylib")