aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct9
-rw-r--r--extension/deps/SCsub9
2 files changed, 12 insertions, 6 deletions
diff --git a/SConstruct b/SConstruct
index ee7be9d..db5d150 100644
--- a/SConstruct
+++ b/SConstruct
@@ -36,10 +36,9 @@ SConscript("extension/deps/SCsub", "env")
# - LINKFLAGS are for linking flags
# tweak this if you want to use different folders, or more folders, to store your source code in.
-source_paths = ["extension/src"]
-include_paths = ["extension/deps/gli", "extension/deps/gli/external"]
-env.Append(CPPPATH=[[env.Dir(p) for p in source_paths + include_paths]])
-sources = env.GlobRecursive("*.cpp", source_paths)
+paths = ["extension/src"]
+env.Append(CPPPATH=[[env.Dir(p) for p in paths]])
+sources = env.GlobRecursive("*.cpp", paths)
env.extension_sources = sources
# Remove unassociated intermediate binary files if allowed, usually the result of a renamed or deleted source file
@@ -50,7 +49,7 @@ if env["intermediate_delete"]:
return file[:file.rindex(".")]
found_one = False
- for path in source_paths:
+ for path in paths:
for obj_file in [file[:-len(".os")] for file in glob(path + "*.os", recursive=True)]:
found = False
for source_file in sources:
diff --git a/extension/deps/SCsub b/extension/deps/SCsub
index 25a3286..6a7a48d 100644
--- a/extension/deps/SCsub
+++ b/extension/deps/SCsub
@@ -9,4 +9,11 @@ def build_openvic_simulation(env):
env.Append(CPPPATH=ovsim_env.openvic_simulation["INCPATH"])
env.openvic_simulation = ovsim_env.openvic_simulation
-build_openvic_simulation(env) \ No newline at end of file
+def build_gli(env):
+ gli_includes = ["gli", "gli/external"]
+ env.gli_loader = {}
+ env.gli_loader["INCPATH"] = [env.Dir(p) for p in gli_includes]
+ env.Append(CPPPATH=env.gli_loader["INCPATH"])
+
+build_openvic_simulation(env)
+build_gli(env)