Out-of-tree build fixes

- fixed when the build dir is not even in the tree (git)
- the path to QT worked only if $(srcdir) is relative (configure was
invoked with relative path)
This commit is contained in:
Martin Pulec
2021-06-23 14:03:18 +02:00
parent 8eb8ecfcac
commit ee801e6c38
2 changed files with 3 additions and 3 deletions

View File

@@ -459,7 +459,7 @@ src/capture_filter/preview.o: src/capture_filter/preview.cpp $(ALL_INCLUDES)
$(GUI_TARGET): $(wildcard $(srcdir)/gui/QT/*.cpp $(srcdir)/gui/QT/*.hpp) $(srcdir)/src/shared_mem_frame.cpp $(srcdir)/tools/astat.h
$(MKDIR_P) $(dir $@)
if test -z "$(QMAKE)"; then echo "Reconfigure with '--enable-qt'"; exit 1; fi
cd gui/QT && $(QMAKE) "DESTDIR+=./" $(srcdir)/../../gui/QT && make -j 4
QT_SRC=$$(realpath $(srcdir))/gui/QT; cd gui/QT && $(QMAKE) "DESTDIR+=./" $$QT_SRC && make -j 4
# -------------------------------------------------------------------------------------------------
TEST_OBJS = $(COMMON_OBJS) \

View File

@@ -89,7 +89,7 @@ AC_MSG_CHECKING([GIT presence])
if which git
then
AC_MSG_CHECKING([checking GIT branch ])
git_branch=`git name-rev --name-only HEAD`
git_branch=`SRC=$(dirname "$0"); git -C "$SRC" name-rev --name-only HEAD`
if test "$git_branch"; then
AC_DEFINE_UNQUOTED([GIT_BRANCH], "$git_branch", [Current GIT branch])
AC_MSG_RESULT($git_branch);
@@ -97,7 +97,7 @@ then
AC_MSG_RESULT(no);
fi
AC_MSG_CHECKING([checking GIT revision ])
git_rev=`git rev-parse --short HEAD`
git_rev=`SRC=$(dirname "$0"); git -C "$SRC" rev-parse --short HEAD`
if test "$git_rev"; then
AC_DEFINE_UNQUOTED([GIT_REV], "$git_rev", [Current GIT revision])
AC_MSG_RESULT($git_rev);