Support setting the library-search environment on a few more OSs

Most Unix systems will honor LD_LIBRARY_PATH (all ELF-based systems
definitely do), so let's not make it an error if the user isn't
compiling on Linux or FreeBSD. The only known exception are Darwin /
Mac OS X and AIX. For everything else, cause an error.

The list of unames came from: http://en.wikipedia.org/wiki/Uname.

AIX does not use ELF, so its variable is called LIBPATH:
 http://publib.boulder.ibm.com/infocenter/forms/v3r5m0/index.jsp?topic=/com.ibm.form.api.configuring.doc/api_configuring_unix_path.html

Change-Id: I67055e6a231aa1430d91431e7cab5f98f0e1bd95
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
bb10
Thiago Macieira 2013-05-10 11:06:57 -07:00 committed by The Qt Project
parent cef67cc8db
commit 3523c9e138
1 changed files with 3 additions and 1 deletions

View File

@ -240,13 +240,15 @@ defineTest(qtAddTargetEnv) {
deppath += $$shell_path($$eval(QT.$${dep}.libs))
equals(QMAKE_HOST.os, Windows) {
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD) {
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
deppath.name = LD_LIBRARY_PATH
} else:equals(QMAKE_HOST.os, Darwin) {
contains(QT_CONFIG, qt_framework): \
deppath.name = DYLD_FRAMEWORK_PATH
else: \
deppath.name = DYLD_LIBRARY_PATH
} else:equals(QMAKE_HOST.os, AIX) {
deppath.name = LIBPATH
} else {
error("Operating system not supported.")
}