vlc-config: don't store optimisation cflags in cppflags (preprocessor flags), revive...
authorRafaël Carré <funman@videolan.org>
Mon, 10 Dec 2007 13:23:37 +0000 (13:23 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 10 Dec 2007 13:23:37 +0000 (13:23 +0000)
qt4: use preprocessor flags with moc, so it finds the headers in the right place

modules/gui/qt4/Modules.am
vlc-config.in.in

index b2b8047..69b4b6b 100644 (file)
@@ -70,7 +70,7 @@ resources.cpp: res.qrc
        $(RCC) -name vlc -o $@ $<
 
 .hpp.moc.cpp:
-       $(MOC) -o $@ $<
+       $(MOC) $(CPPFLAGS) -I$(top_builddir) `$(VLC_CONFIG) --cppflags plugin qt4` -o $@ $<
 
 .ui.h:
        mkdir -p -- ui
index 4e5d1b3..6f6d7e3 100644 (file)
@@ -133,17 +133,27 @@ if [ "${release}" = yes ]; then
   cppflags="${cppflags} -DHAVE_RELEASE"
 fi
 if [ "${optim}" = size ]; then
-  cppflags="${cppflags} ${cflags_optim_size} ${cflags_tuning}"
+  cflags="${cflags} ${cflags_optim_size} ${cflags_tuning}"
+  cxxflags="${cxxflags} ${cflags_optim_size} ${cflags_tuning}"
+  objcflags="${objcflags} ${cflags_optim_size} ${cflags_tuning}"
   if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
-    cppflags="${cppflags} ${cflags_optim_nodebug}"
+    cflags="${cflags} ${cflags_optim_nodebug}"
+    cxxflags="${cxxflags} ${cflags_optim_nodebug}"
+    objcflags="${objcflags} ${cflags_optim_nodebug}"
   fi
 elif [ "${optim}" = speed ]; then
-  cppflags="${cppflags} ${cflags_optim_speed} ${cflags_tuning}"
+  cflags="${cflags} ${cflags_optim_speed} ${cflags_tuning}"
+  cxxflags="${cxxflags} ${cflags_optim_speed} ${cflags_tuning}"
+  objcflags="${objcflags} ${cflags_optim_speed} ${cflags_tuning}"
   if [ "${debug}" != yes -a "${gprof}" != yes -a "${cprof}" != yes ]; then
-    cppflags="${cppflags} ${cflags_optim_nodebug}"
+    cflags="${cflags} ${cflags_optim_nodebug}"
+    cxxflags="${cxxflags} ${cflags_optim_nodebug}"
+    objcflags="${objcflags} ${cflags_optim_nodebug}"
   fi
 else
-  cppflags="${cppflags} ${cflags_nooptim}"
+  cflags="${cflags} ${cflags_nooptim}"
+  cxxflags="${cxxflags} ${cflags_nooptim}"
+  objcflags="${objcflags} ${cflags_nooptim}"
 fi
 
 #
@@ -188,6 +198,9 @@ while test $# -gt 0; do
     --cflags)
       echo_cflags=yes
       ;;
+    --cppflags)
+      echo_cppflags=yes
+      ;;
     --cxxflags)
       echo_cxxflags=yes
       ;;