diff options
authorThomas Petazzoni <>2011-02-07 17:18:00 (GMT)
committerPeter Korsgaard <>2011-02-07 17:22:25 (GMT)
commitca290e7e280da8bdaa2818d6666fee1875f359ef (patch)
parent0c19765ba4289f0a1d53b7060095b65c42b9cda6 (diff)
qt: move host programs and specs in HOST_DIR
The Qt build system installs all host programs (uic, rcc, moc, qmake, etc.) in the same base directory as the headers and libraries, but that's not great for Buildroot. So we now move the host programs and the mkspecs files to the $(HOST_DIR), and create a qt.conf, which tells qmake where everything is located. Tested with Qmake and Cmake as build system for a simple Qt application. Signed-off-by: Thomas Petazzoni <> Signed-off-by: Peter Korsgaard <>
1 files changed, 17 insertions, 1 deletions
diff --git a/package/qt/ b/package/qt/
index 6eb31bc..3857087 100644
--- a/package/qt/
+++ b/package/qt/
@@ -536,8 +536,24 @@ $(QT_TARGET_DIR)/.compiled: $(QT_TARGET_DIR)/.configured
touch $@
-$(STAGING_DIR)/usr/lib/ $(QT_TARGET_DIR)/.compiled
+ mkdir -p $(dir $@)
+ echo "[Paths]" > $@
+ echo "Prefix=$(HOST_DIR)/usr" >> $@
+ echo "Headers=$(STAGING_DIR)/usr/include" >> $@
+ echo "Libraries=$(STAGING_DIR)/usr/lib" >> $@
+ echo "Data=$(HOST_DIR)/usr" >> $@
+ echo "Binaries=$(HOST_DIR)/usr/bin" >> $@
+$(STAGING_DIR)/usr/lib/ $(QT_TARGET_DIR)/.compiled $(HOST_DIR)/usr/bin/qt.conf
$(MAKE) -C $(QT_TARGET_DIR) install
+ # Move host programs and spec files to the host directory. The
+ # generated qt.conf file will tell qmake where everything is.
+ mv $(addprefix $(STAGING_DIR)/usr/bin/,moc rcc qmake lrelease) $(HOST_DIR)/usr/bin
+ mv $(STAGING_DIR)/usr/bin/uic $(HOST_DIR)/usr/bin
+ mv $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr
qt-gui: $(STAGING_DIR)/usr/lib/
mkdir -p $(TARGET_DIR)/usr/lib/fonts