summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2020-06-18 10:07:22 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2020-06-29 12:47:34 +0200
commitd7fd6848612760124871f0f3b55917250d078dd5 (patch)
tree49f97ad5f16f5fd32cf69a5497c20581bf65b592 /bin
parentb0f9c06a9b199a7474eb94a6292b5824364344b6 (diff)
CMake: Support cross-compilation with qmake
When cross-compiling, we now create a target_qt.conf file that's to be used with the host Qt's qmake. With "qmake -qtconf .../target_qt.conf" projects can be cross-built against the cross-built Qt. We also create wrapper scripts for the host qmake to save the user from passing the -qtconf argument. Fixes: QTBUG-82581 Change-Id: Ib5866e7e820369efea9eb3171e3e3e3ca5c0c3c1 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'bin')
-rw-r--r--bin/qmake-wrapper-for-target.bat.in2
-rw-r--r--bin/qmake-wrapper-for-target.in7
2 files changed, 9 insertions, 0 deletions
diff --git a/bin/qmake-wrapper-for-target.bat.in b/bin/qmake-wrapper-for-target.bat.in
new file mode 100644
index 0000000000..cce775a768
--- /dev/null
+++ b/bin/qmake-wrapper-for-target.bat.in
@@ -0,0 +1,2 @@
+@echo off
+@host_qt_bindir@\qmake.exe %* -qtconf "%~dp0\target_qt.conf"
diff --git a/bin/qmake-wrapper-for-target.in b/bin/qmake-wrapper-for-target.in
new file mode 100644
index 0000000000..0c81b7c62f
--- /dev/null
+++ b/bin/qmake-wrapper-for-target.in
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# The directory of this script is the expanded absolute path of the "$qt_prefix/bin" directory.
+script_dir_path=`dirname $0`
+script_dir_path=`(cd "$script_dir_path"; /bin/pwd)`
+
+@host_qt_bindir@/qmake $* -qtconf "$script_dir_path/target_qt.conf"