Skip to content

Commit

Permalink
Do not automatically set RPATH to installation target (for building p…
Browse files Browse the repository at this point in the history
…ackages).
  • Loading branch information
klayoutmatthias committed Sep 10, 2017
1 parent 0cb58fc commit 4381ebf
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
18 changes: 16 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ RUBY=""
PYTHON=""
BUILD=""
BIN=""
RPATH=""

MAKE_OPT=""

Expand Down Expand Up @@ -124,6 +125,10 @@ while [ "$*" != "" ]; do
BIN="$1"
shift
;;
-rpath)
RPATH="$1"
shift
;;
-qt4)
HAVE_QT5=0
;;
Expand All @@ -150,6 +155,7 @@ while [ "$*" != "" ]; do
echo " -python <prog> Use Python interpreter 'prog'"
echo " -build <path> Directory where to do the build"
echo " -bin|-prefix <path> Directory where to install the binary"
echo " -rpath <rpath> Specifies the RPATH to use (default: same as -bin)"
echo " -option <option> 'make' options (i.e. -j2)"
echo ""
echo " -with-qtbinding Create Qt bindings for ruby scripts [default]"
Expand Down Expand Up @@ -366,6 +372,12 @@ fi
if [ $HAVE_64BIT_COORD != 0 ]; then
echo " 64 bit coordinates enabled"
fi
if [ "$RPATH" = "" ]; then
RPATH="$BIN"
fi

echo " Installation target is $BIN"
echo " Build directory is $BUILD"

# Check Ruby installation
if [ "$RUBYINCLUDE" != "" ]; then
Expand Down Expand Up @@ -476,7 +488,8 @@ qmake_cmd="$QMAKE $CURR_DIR/src/klayout.pro -recursive \
HAVE_QTBINDINGS=$HAVE_QTBINDINGS \
HAVE_64BIT_COORD=$HAVE_64BIT_COORD \
HAVE_QT5=$HAVE_QT5 \
PREFIX=$BIN \
PREFIX='$BIN' \
RPATH='$RPATH' \
KLAYOUT_VERSION=$KLAYOUT_VERSION \
KLAYOUT_VERSION_DATE=$KLAYOUT_VERSION_DATE \
KLAYOUT_VERSION_REV=$KLAYOUT_VERSION_REV \
Expand Down Expand Up @@ -507,7 +520,8 @@ cd $BUILD
$MAKE_PRG install
cd $CURR_DIR
echo ""
echo "Build done."
echo "Build successfully done."
echo "Artefacts were installed to $BIN"

exit 0

4 changes: 3 additions & 1 deletion src/klayout.pri
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ equals(HAVE_RUBY, "1") {
HAVE_RUBY_VERSION_CODE=$$RUBYVERSIONCODE
}

QMAKE_RPATHDIR += $$PREFIX
!isEmpty(RPATH) {
QMAKE_RPATHDIR += $$RPATH
}

QMAKE_CXXFLAGS_WARN_ON += \
-pedantic \
Expand Down

0 comments on commit 4381ebf

Please sign in to comment.