summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2017-10-12 23:48:58 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2017-10-16 06:53:32 +0000
commitfffab73c45d4da636889c0cdd9f02cb113ad7a37 (patch)
tree74e3b3c7ad33f8843fb99c997c62eeac2ff0d910
parente92383844963272914d215110cca72ac004ff718 (diff)
downloadqtivi-fffab73c45d4da636889c0cdd9f02cb113ad7a37.tar.gz
Enable building on Windows for MSVC, MingW and Android
Change-Id: I9563fea0619b540f8e4dd929bf72a3c4178066bb Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r--mkspecs/features/ivigenerator.prf4
-rw-r--r--src/tools/ivigenerator/qface_internal_build.pri10
2 files changed, 7 insertions, 7 deletions
diff --git a/mkspecs/features/ivigenerator.prf b/mkspecs/features/ivigenerator.prf
index 6dcb53d..b4f291d 100644
--- a/mkspecs/features/ivigenerator.prf
+++ b/mkspecs/features/ivigenerator.prf
@@ -19,7 +19,7 @@ isEmpty(QFACE_SOURCES): error("QFACE_SOURCES must be set!")
}
# See the win32 section, why this is needed
-equals(QMAKE_HOST.os, Windows):!contains(CONFIG, debug_and_release) {
+win32-msvc*:!contains(CONFIG, debug_and_release) {
error("The ivigenerator works only in the debug_and_release configuration on windows")
}
@@ -136,7 +136,7 @@ QMAKE_EXTRA_TARGETS += Makefile qface_sources
# where we can envorce the run of the generator and qmake.
# Afterwards the sub makefiles are read (Makefile.debug/release), which have been
# regenerated before starting NMAKE on them.
-equals(QMAKE_HOST.os, Windows) {
+win32-msvc* {
qmake.depends = $$relative_path($$PRI, $$OUT_PWD)
debug.depends = qmake
diff --git a/src/tools/ivigenerator/qface_internal_build.pri b/src/tools/ivigenerator/qface_internal_build.pri
index 10424d9..0ffcc9f 100644
--- a/src/tools/ivigenerator/qface_internal_build.pri
+++ b/src/tools/ivigenerator/qface_internal_build.pri
@@ -18,7 +18,7 @@ VIRTUALENV_EXE += " -p $$QMAKE_PYTHON3_LOCATION"
# On some systems virtualenv --always-copy doesn't work (https://github.com/pypa/virtualenv/issues/565).
# To workaround the problem, we need to manually create the folder and create the virtualenv from
# inside
-win32: qtivi_qface_virtualenv.target = qtivi_qface_virtualenv/Scripts/python.exe
+equals(QMAKE_HOST.os, Windows): qtivi_qface_virtualenv.target = qtivi_qface_virtualenv/Scripts/python.exe
else: qtivi_qface_virtualenv.target = qtivi_qface_virtualenv/bin/python
qtivi_qface_virtualenv.commands = \
$(MKDIR) qtivi_qface_virtualenv $$escape_expand(\n\t) \
@@ -27,7 +27,7 @@ qtivi_qface_virtualenv.commands = \
@echo "Set up virtualenv for qface, name: qtivi_qface_virtualenv"
QMAKE_EXTRA_TARGETS += qtivi_qface_virtualenv
-win32: VIRTUALENV_ACTIVATION = qtivi_qface_virtualenv\Scripts\activate &&
+equals(QMAKE_HOST.os, Windows): VIRTUALENV_ACTIVATION = qtivi_qface_virtualenv\Scripts\activate &&
else: VIRTUALENV_ACTIVATION = . qtivi_qface_virtualenv/bin/activate &&
# Create the forceRebuild file during the qmake run.
@@ -39,7 +39,7 @@ write_file($$OUT_PWD/forceRebuild)
PYTHON3_SHORT_VERSION_SPLITTED = $$split(QMAKE_PYTHON3_VERSION, .)
PYTHON3_SHORT_VERSION = $$member(PYTHON3_SHORT_VERSION_SPLITTED, 0).$$member(PYTHON3_SHORT_VERSION_SPLITTED, 1)
# Always run this target
-win32: qtivi_qface_install.target = qtivi_qface_virtualenv/Lib/site-packages/qface
+equals(QMAKE_HOST.os, Windows): qtivi_qface_install.target = qtivi_qface_virtualenv/Lib/site-packages/qface
else: qtivi_qface_install.target = qtivi_qface_virtualenv/lib/python$${PYTHON3_SHORT_VERSION}/site-packages/qface
qtivi_qface_install.depends = $${qtivi_qface_virtualenv.target}
qtivi_qface_install.depends += $$QFACE_SOURCE_DIR/setup.py
@@ -48,14 +48,14 @@ qtivi_qface_install.depends += $$QFACE_SOURCE_DIR/qface/__about__.py
qtivi_qface_install.commands = $$VIRTUALENV_ACTIVATION \
pip3 install --upgrade $$shell_path($$QFACE_SOURCE_DIR) $$escape_expand(\n\t) \
@echo "Installed qface development version into qtivi_qface_virtualenv" $$escape_expand(\n\t)
-win32: qtivi_qface_install.commands += @COPY /B $$shell_path($$OUT_PWD/forceRebuild)+,, $$shell_path($$OUT_PWD/forceRebuild) >NUL
+equals(QMAKE_HOST.os, Windows): qtivi_qface_install.commands += @COPY /B $$shell_path($$OUT_PWD/forceRebuild)+,, $$shell_path($$OUT_PWD/forceRebuild) >NUL
else: qtivi_qface_install.commands += @touch $$OUT_PWD/forceRebuild
QMAKE_EXTRA_TARGETS += qtivi_qface_install
# We need to make the virtualenv first deployable
# Otherwise it still needs some modules from the system
deploy_virtualenv.target = .stamp-deploy_virtualenv
-win32 {
+equals(QMAKE_HOST.os, Windows) {
deploy_virtualenv.commands = $$PWD/deploy-virtualenv.bat qtivi_qface_virtualenv $$escape_expand(\n\t)
deploy_virtualenv.commands += @type nul > $$shell_path($$OUT_PWD/.stamp-deploy_virtualenv)
} else {