aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--README.md3
-rw-r--r--deps/SCsub31
m---------deps/lauf0
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
diff --git a/README.md b/README.md
index a2bc33b..3a415bc 100644
--- a/README.md
+++ b/README.md
@@ -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`.
diff --git a/deps/SCsub b/deps/SCsub
index 1afdd85..20e192a 100644
--- a/deps/SCsub
+++ b/deps/SCsub
@@ -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