tizen beta release
[profile/ivi/webkit-efl.git] / Tools / qmake / mkspecs / features / rpath.prf
1 # -------------------------------------------------------------------
2 # Set rpath for the application/library we're building
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6
7 equals(ROOT_BUILD_DIR, $$dirname(DESTDIR)): RPATHDIR_RELATIVE_TO_DESTDIR = ../lib
8
9 linux-*:!isEmpty(RPATHDIR_RELATIVE_TO_DESTDIR) {
10     # Do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR
11     # this expands to $ORIGIN (after qmake and make), it does NOT read a qmake var.
12     QMAKE_RPATHDIR = \$\$ORIGIN/$${RPATHDIR_RELATIVE_TO_DESTDIR} $${QMAKE_RPATHDIR}
13     RPATH = $$join(QMAKE_RPATHDIR, ":")
14
15     QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${RPATH}\'
16     QMAKE_RPATHDIR =
17 } else {
18     QMAKE_RPATHDIR = $${ROOT_BUILD_DIR}/lib $${QMAKE_RPATHDIR}
19 }