Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-09-15 14:10:05 +0000
committerStijn Buys <ingar@osirion.org>2013-09-15 14:10:05 +0000
commit9c6a5358c0b22b87324280a97eed7d0f3c0bacaa (patch)
tree0e53d9ed6edf0d5fce2f1e1d6b51f373ec8cb5c2
parent6e1dc30001d25f139dc2196d3fa99668879f385f (diff)
Adds the --with-qt-moc option to the configure script.
-rw-r--r--configure.in21
-rw-r--r--src/Makefile.am2
2 files changed, 18 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 974e5b6..b008aff 100644
--- a/configure.in
+++ b/configure.in
@@ -44,7 +44,7 @@ AC_ARG_WITH([qt-includes],
AC_MSG_RESULT($QTINCLUDEDIR)
dnl
-dnl libraries directory
+dnl Qt libraries directory
dnl
AC_MSG_CHECKING(Qt libraries directory)
AC_ARG_WITH([qt-libraries],
@@ -53,6 +53,19 @@ AC_ARG_WITH([qt-libraries],
[QTLIBDIR="$QTDIR/lib"])
AC_MSG_RESULT($QTLIBDIR)
+
+dnl
+dnl Qt moc
+dnl
+AC_MSG_CHECKING(Qt moc)
+AC_ARG_WITH([qt-moc],
+ AC_HELP_STRING([--with-qt-moc=], [Full path of the moc prepreocessor.]),
+ [QTMOC="$withval"],
+ [QTMOC="$QTDIR/bin/moc"])
+AC_MSG_RESULT($QTMOC)
+
+AC_SUBST(QTMOC)
+
host=`uname -a` # AC_CANONICAL_HOST is broken at the time of this writing.
case $host in
MINGW32*)
@@ -102,11 +115,11 @@ int main( int argc, char **argv )
}
EOF
-AC_MSG_CHECKING(does moc work)
-bnv_try_1="moc myqt.h -o moc_myqt.cpp"
+AC_MSG_CHECKING(does $QTMOC work)
+bnv_try_1="$QTMOC myqt.h -o moc_myqt.cpp"
AC_TRY_EVAL(bnv_try_1)
if test x"$ac_status" != x0; then
- AC_MSG_ERROR(moc doesn't work)
+ AC_MSG_ERROR($QTMOC doesn't work)
fi
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(can I compile moc_myqt.cpp)
diff --git a/src/Makefile.am b/src/Makefile.am
index 35d1496..ca93392 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,5 +28,5 @@ nodist_editor_SOURCES = \
# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
moc_%.cc: %.h
- moc $< -o $@
+ $(QTMOC) $< -o $@
\ No newline at end of file