aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct10
1 files changed, 7 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct
index 423994d..f2a66bc 100644
--- a/SConstruct
+++ b/SConstruct
@@ -213,6 +213,8 @@ env.GlobRecursive = GlobRecursive
SConscript("deps/SCsub")
+env.openvic_dataloader = {}
+
# For the reference:
# - CCFLAGS are compilation flags shared between C and C++
# - CFLAGS are for C-specific compilation flags
@@ -245,10 +247,12 @@ if env["build_ovdl_library"]:
library = env.StaticLibrary(target=env.File("bin/%s" % library_name), source=sources)
Default(library)
-env.Append(LIBPATH=[env.Dir("bin")])
+ env.openvic_dataloader["LIBPATH"] = [env.Dir("bin")]
+ env.openvic_dataloader["LIBS"] = [library_name]
+ env.openvic_dataloader["INCPATH"] = [env.Dir("include")]
-if library != None or os.path.exists("bin/%s" % library_name):
- env.Append(LIBS=[library_name])
+ env.Append(LIBPATH=env.openvic_dataloader["LIBPATH"])
+ env.Append(LIBS=env.openvic_dataloader["LIBS"])
headless_program = None
env["PROGSUFFIX"] = suffix + env["PROGSUFFIX"]