diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
commit | 1e64dddf1ea30282c89de7f35854a68614234652 (patch) | |
tree | 165d37c1c66f6ff79d48c74794238b3f0bed09da /src/parsersettings.cc | |
parent | 5c779159c208ca3d88c88479ab29f9cd66574859 (diff) | |
parent | d0856efe6da545693f9c50a8a2514a9f999ab5ef (diff) |
Merge branch 'master' of github.com:openscad/openscad into issue159
Diffstat (limited to 'src/parsersettings.cc')
-rw-r--r-- | src/parsersettings.cc | 10 |
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); |