vendor: seperate lexbor source from build

* add `vendor/lexbor-src` submodule
* build lexbor static lib into `vendor/lexbor`
This commit is contained in:
Pierre Tachoire
2023-09-01 15:14:23 +02:00
parent 8d82bf0434
commit 3bfefcb047
5 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
zig-cache zig-cache
zig-out zig-out
/vendor/lexbor/

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "vendor/jsruntime-lib"] [submodule "vendor/jsruntime-lib"]
path = vendor/jsruntime-lib path = vendor/jsruntime-lib
url = https://github.com/francisbouvier/jsruntime-lib url = https://github.com/francisbouvier/jsruntime-lib
[submodule "vendor/lexbor-src"]
path = vendor/lexbor-src
url = https://github.com/lexbor/lexbor

View File

@@ -60,8 +60,9 @@ install-dev: install-submodule install-lexbor install-jsruntime-dev
## Install and build v8 engine for dev ## Install and build v8 engine for dev
install-lexbor: install-lexbor:
@mkdir -p vendor/lexbor
@cd vendor/lexbor && \ @cd vendor/lexbor && \
cmake . -DLEXBOR_BUILD_SHARED=OFF -DLEXBOR_BUILD_STATIC=ON -DLEXBOR_BUILD_TESTS_CPP=OFF -DLEXBOR_INSTALL_HEADERS=OFF && \ cmake ../lexbor-src -DLEXBOR_BUILD_SHARED=OFF -DLEXBOR_BUILD_STATIC=ON -DLEXBOR_BUILD_TESTS_CPP=OFF -DLEXBOR_INSTALL_HEADERS=ON && \
make make
install-jsruntime-dev: install-jsruntime-dev:

View File

@@ -78,5 +78,5 @@ fn linkLexbor(step: *std.build.LibExeObjStep) void {
// cmake . -DLEXBOR_BUILD_SHARED=OFF // cmake . -DLEXBOR_BUILD_SHARED=OFF
const lib_path = "vendor/lexbor/liblexbor_static.a"; const lib_path = "vendor/lexbor/liblexbor_static.a";
step.addObjectFile(lib_path); step.addObjectFile(lib_path);
step.addIncludePath("vendor/lexbor/source"); step.addIncludePath("vendor/lexbor-src/source");
} }

1
vendor/lexbor-src vendored Submodule

Submodule vendor/lexbor-src added at b2c0a617f3