Skip to content

Commit

Permalink
Install libraries under prefix
Browse files Browse the repository at this point in the history
The installation prefix can be configured when invoking qmake, for instance:

  mkdir build/
  cd build/
  qmake -qt=qt5 ../evnav.pro PREFIX=/opt

A root prefix can be specified at install time (for packaging):

  INSTALL_ROOT=$PWD/sysroot make install

Signed-off-by: Francis Giraldeau <[email protected]>
  • Loading branch information
giraldeau committed Jan 6, 2017
1 parent 74b1dc7 commit 09ac8e8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
5 changes: 5 additions & 0 deletions common.pri
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ unix {
CONFIG(debug) {
QMAKE_RPATHDIR += $${top_builddir}/libevnav/
}

isEmpty(PREFIX) {
PREFIX = /usr/local
}

}

DEFINES += TOPSRCDIR=\\\"\"$${top_srcdir}\"\\\"
9 changes: 4 additions & 5 deletions evnav-cli/evnav-cli.pro
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ SOURCES += main.cpp

HEADERS +=

unix {
target.path = /usr/bin
INSTALLS += target
}

include(../common.pri)
include(../libevnav.pri)

unix {
target.path = $$PREFIX/bin
INSTALLS += target
}
12 changes: 5 additions & 7 deletions libevnav/libevnav.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ HEADERS += graph.h \
evnavrequest.h \
evnav.h

unix {
target.path = /usr/lib
INSTALLS += target
}
LIBS += -L$${top_builddir}/3rdparty/qhttp/xbin -l:libqhttp.a

include(../common.pri)

LIBS += -L$${top_builddir}/3rdparty/qhttp/xbin -l:libqhttp.a

#QMAKE_CXXFLAGS += -fsanitize=thread
unix {
target.path = $$PREFIX/lib
INSTALLS += target
}

0 comments on commit 09ac8e8

Please sign in to comment.