summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2019-03-15 17:24:54 +0200
committerAapo Keskimolo <aapo.keskimolo@qt.io>2019-03-19 09:45:38 +0000
commiteec352d375e62e6881c10a783dae890dd6ce58ef (patch)
tree2a5c7fee42618b9bace4aa4c81226bca0e0d00e4
parente0458123953834d72bd3efbb87f9101e0ab284d3 (diff)
Add custominstall.prf for better control of install location
Specify your custom installation path QT3DS_CUSTOM_INSTALL_PATH environment variable before running qmake. This allows bit better control of the install location compared to INSTALL_ROOT - namely a possibility to install to different drive on windows and a possibility to omit superfluous Qt directories from the install path. Task-number: QT3DS-3145 Change-Id: Ie626fd556c3477a5dc64c08cda75e4c1404f1604 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--.qmake.conf2
-rw-r--r--features/custominstall.prf10
2 files changed, 11 insertions, 1 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 4580e6c..4d5f549 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,6 +1,6 @@
load(qt_build_config)
-CONFIG += warning_clean
+CONFIG += warning_clean custominstall
DEFINES += QT_NO_FOREACH
MODULE_VERSION = 2.3.0
diff --git a/features/custominstall.prf b/features/custominstall.prf
new file mode 100644
index 0000000..835b3f9
--- /dev/null
+++ b/features/custominstall.prf
@@ -0,0 +1,10 @@
+# Fixes all INSTALLS paths so that QT_INSTALL_PREFIX is replaced by the value of
+# the environment variable QT3DS_CUSTOM_INSTALL_PATH
+
+QT3DS_CUSTOM_INSTALL_PATH = $$clean_path($$(QT3DS_CUSTOM_INSTALL_PATH))
+!isEmpty(QT3DS_CUSTOM_INSTALL_PATH) {
+ for (install, INSTALLS) {
+ CUR_PATH = $$eval($${install}.path)
+ $${install}.path = $$replace(CUR_PATH, $$[QT_INSTALL_PREFIX], $$QT3DS_CUSTOM_INSTALL_PATH)
+ }
+}