summaryrefslogtreecommitdiff
path: root/src/parsersettings.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/parsersettings.cc')
-rw-r--r--src/parsersettings.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/parsersettings.cc b/src/parsersettings.cc
index 47859c7..3dda132 100644
--- a/src/parsersettings.cc
+++ b/src/parsersettings.cc
@@ -28,7 +28,15 @@ std::string locate_file(const std::string &filename)
void parser_init(const std::string &applicationpath)
{
- // FIXME: Append paths from OPENSCADPATH before adding built-in paths
+ // Add path from OPENSCADPATH before adding built-in paths
+ const char *openscadpath = getenv("OPENSCADPATH");
+ if (openscadpath) {
+ add_librarydir(boosty::absolute(fs::path(openscadpath)).string());
+ }
+
+ // FIXME: Support specifying more than one path in OPENSCADPATH
+ // FIXME: Add ~/.openscad/libraries
+ // FIXME: Add ~/Documents/OpenSCAD/libraries on Mac?
std::string librarydir;
fs::path libdir(applicationpath);
contact: Jan Huwald // Impressum