diff options
author | Spartan322 <Megacake1234@gmail.com> | 2024-07-22 19:48:58 +0200 |
---|---|---|
committer | Spartan322 <Megacake1234@gmail.com> | 2024-08-03 23:57:06 +0200 |
commit | bfea50b4188f18c68289e2b8cd915220393de8d4 (patch) | |
tree | 0630520ab8604373c8f42a342467949377eb0f5a | |
parent | 3c07aa7a890e82d1ba28bdc3bbb1a8f9896f25d1 (diff) |
Add Lauf
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | deps/SCsub | 31 | ||||
m--------- | deps/lauf | 0 |
4 files changed, 35 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules index e4a550f..d3af07b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "deps/plf_colony"] path = deps/plf_colony url = https://github.com/mattreecebentley/plf_colony +[submodule "deps/lauf"] + path = deps/lauf + url = https://github.com/OpenVicProject/lauf @@ -6,9 +6,10 @@ For detailed instructions, view the OpenVic Contributor Quickstart Guide [here]( ## Required * [scons](https://scons.org/) +* [cmake](https://cmake.org/) ## Build Instructions -1. Install [scons](https://scons.org/) for your system. +1. Install [scons](https://scons.org/) and [cmake](https://cmake.org/) for your system. 2. Run the command `git submodule update --init --recursive` to retrieve all related submodules. 3. Run `scons` in the project root, you should see a openvic-simulation.headless file in `bin`. @@ -31,7 +31,36 @@ def build_colony(env): env.Append(CPPPATH=env.colony["INCPATH"]) env.exposed_includes += env.colony["INCPATH"] +def build_lauf(env): + lauf_dir = env.Dir("lauf") + + cmake_configure = env.AddPreAction( + lauf_dir, + env.Command( + env.File('lauf/build/CMakeCache.txt'), + env.File('lauf/CMakeLists.txt'), + env.Action('@cmake -DCMAKE_BUILD_TYPE="Release" -DLAUF_BUILD_BENCHMARKS=false -DLAUF_BUILD_TESTS=false -DLAUF_BUILD_TOOLS=false -Bbuild -H.', chdir=lauf_dir) + ) + ) + cmake_build = env.AddPreAction( + cmake_configure, + env.Command( + env.File("lauf/build/src/liblauf_core" + env["LIBSUFFIX"]), + env.File('lauf/build/CMakeCache.txt'), + env.Action('@cmake --build build', chdir=lauf_dir) + ) + ) + env.Default(cmake_build) + + include_path = "lauf/include" + env.Append(LIBPATH=env.Dir("lauf/build/src")) + env.Prepend(LIBS=["liblauf_core", "liblauf_text", "liblauf_qbe"]) + env.Append(CPPPATH=[env.Dir(include_path)]) + env.Append(CPPDEFINES=["LAUF_CONFIG_DISPATCH_JUMP_TABLE=1"]) + env.exposed_includes += [env.Dir(include_path)] + build_openvic_dataloader(env) build_lexy_vdf(env) build_ordered_map(env) -build_colony(env)
\ No newline at end of file +build_colony(env) +build_lauf(env)
\ No newline at end of file diff --git a/deps/lauf b/deps/lauf new file mode 160000 +Subproject b770424327e79da22c57f7d4f04ef525be51a21 |