summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2012-12-29 20:26:59 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2012-12-29 20:26:59 (GMT)
commit7afcc417b3d26274342ad5293eaad76d7719ae32 (patch)
tree4a3f77701e2c8fedbe552fd743af480f18374ced
parent4cc6e2a1b1b5dacb75abaa6f35d81abb7dc8c8ed (diff)
prevent LD_LIBRARY_PATH problems on unix (not OSX) systems with
dependency builds, by using RPATH during build. remove the shell script workaround that was added during the previous commit, as it is 'less clean' a solution.
-rw-r--r--README.md7
-rw-r--r--openscad.pro9
-rwxr-xr-xscripts/openscad-unirun.sh4
3 files changed, 9 insertions, 11 deletions
diff --git a/README.md b/README.md
index ebe69c0..678b213 100644
--- a/README.md
+++ b/README.md
@@ -176,13 +176,6 @@ check dependencies
Then follow the Compilation instructions below.
-Note that if you build dependencies with this method, you may have to
-modify your LD_LIBRARY_PATH environment variable every time you run the
-openscad binary to avoid library problems. A workaround script called
-"openscad-unirun.sh" has been included to solve this: copy it somewhere
-in your PATH (/usr/local/bin) and run 'openscad-unirun.sh' instead of
-the openscad binary.
-
### Building for Windows
OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to
diff --git a/openscad.pro b/openscad.pro
index 6d9556b..0048963 100644
--- a/openscad.pro
+++ b/openscad.pro
@@ -101,6 +101,15 @@ netbsd* {
}
}
+# Prevent LD_LIBRARY_PATH problems when running the openscad binary
+# on systems where uni-build-dependencies.sh was used.
+# Will not affect 'normal' builds. Also this is not tested on Mac
+!isEmpty(OPENSCAD_LIBDIR) {
+ unix:!macx {
+ QMAKE_LFLAGS = -Wl,-R$$OPENSCAD_LIBDIR/lib $$QMAKE_LFLAGS
+ }
+}
+
# See Dec 2011 OpenSCAD mailing list, re: CGAL/GCC bugs.
*g++* {
QMAKE_CXXFLAGS *= -fno-strict-aliasing
diff --git a/scripts/openscad-unirun.sh b/scripts/openscad-unirun.sh
deleted file mode 100755
index b0836eb..0000000
--- a/scripts/openscad-unirun.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-LD_LIBRARY_PATH=$HOME/openscad_deps/lib:$HOME/openscad_deps/lib64:$LD_LIBRARY_PATH openscad
-
contact: Jan Huwald // Impressum