summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-07-08 12:32:29 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-07-08 16:26:36 +0200
commitf44850b5c3464cdda0ee9b1ee858d95f3ffaa3e2 (patch)
tree580aa25716bfc88d57f15ad68f7bfa727aebc400 /mkspecs
parentf955bd8ced8b93d142b7f755665946424c6d3644 (diff)
parent3622ebaac51abd2e4d1541120ae3b6e42932359f (diff)
Merge "Merge remote-tracking branch 'origin/dev' into wip/qt6"
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/rtems/qplatformdefs.h4
-rw-r--r--mkspecs/devices/linux-rasp-pi3-g++/qmake.conf2
-rw-r--r--mkspecs/features/android/spec_post.prf6
-rw-r--r--mkspecs/features/create_cmake.prf22
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in15
-rw-r--r--mkspecs/features/data/testserver/Dockerfile2
-rw-r--r--mkspecs/features/data/testserver/docker-compose-common.yml38
-rw-r--r--mkspecs/features/ltcg.prf6
-rw-r--r--mkspecs/features/qt_module.prf12
-rw-r--r--mkspecs/features/unsupported/testserver.prf16
-rw-r--r--mkspecs/features/win32/dumpcpp.prf16
-rw-r--r--mkspecs/features/win32/windows_vulkan_sdk.prf2
12 files changed, 115 insertions, 26 deletions
diff --git a/mkspecs/common/rtems/qplatformdefs.h b/mkspecs/common/rtems/qplatformdefs.h
index 1baa7c7d74..b4ec1de87f 100644
--- a/mkspecs/common/rtems/qplatformdefs.h
+++ b/mkspecs/common/rtems/qplatformdefs.h
@@ -57,8 +57,10 @@
#include <pwd.h>
#include <grp.h>
-#include "../posix/qplatformdefs.h"
+#define __LINUX_ERRNO_EXTENSIONS__
+#include <errno.h>
+#include "../posix/qplatformdefs.h"
#ifdef __STRICT_ANSI__
#undef __STRICT_ANSI__
diff --git a/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf b/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf
index b215833486..d2e1a3a0ad 100644
--- a/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf
+++ b/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf
@@ -31,7 +31,7 @@ QMAKE_LIBS_OPENGL_ES2 = $${VC_LINK_LINE} -lGLESv2
# The official opt vc EGL references GLESv2 symbols: need to link it
QMAKE_LIBS_EGL = $${VC_LINK_LINE} -lEGL -lGLESv2
-QMAKE_LIBDIR_BCM_HOST = $$VC_LIBRARY_PATH
+QMAKE_LIBDIR_BCM_HOST = =$$VC_LIBRARY_PATH
QMAKE_INCDIR_BCM_HOST = $$VC_INCLUDE_PATH
QMAKE_LIBS_BCM_HOST = -lbcm_host
diff --git a/mkspecs/features/android/spec_post.prf b/mkspecs/features/android/spec_post.prf
new file mode 100644
index 0000000000..4d11efb2cf
--- /dev/null
+++ b/mkspecs/features/android/spec_post.prf
@@ -0,0 +1,6 @@
+load(spec_post)
+
+# Work around idiosyncracy in Android NDK's make executable
+# which tries to call the shell-builtin "move" as direct process
+equals(QMAKE_HOST.os, Windows):equals(QMAKE_MOVE, move): \
+ QMAKE_MOVE = cmd /c move
diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf
index c9910dda53..00da9bd33f 100644
--- a/mkspecs/features/create_cmake.prf
+++ b/mkspecs/features/create_cmake.prf
@@ -34,10 +34,20 @@ CMAKE_INCLUDE_NAME = $$eval(QT.$${MODULE}.name)
# TARGET here is the one changed at the end of qt_module.prf,
# which already contains the Qt5 prefix and QT_LIBINFIX suffix :
-# Qt5Core_suffix, Qt5Network_suffix, Foo_suffix
-# (or QtCore_suffix, Foo_suffix on macos with -framework)
+# Qt5Core_{libinfix_suffix}, Qt5Network_{libinfix_suffix}, Foo_{libinfix_suffix}
+# (or QtCore_{libinfix_suffix}, Foo_{libinfix_suffix} on macos with -framework).
CMAKE_QT_STEM = $${TARGET}
+# On macOS when building just a debug configuration which is not part of debug_and_release,
+# $${TARGET} already contains a _debug suffix, as per the following call chain:
+# qt_module.prf -> qt5LibraryTarget -> qtLibraryTarget -> qtPlatformTargetSuffix.
+# Remove the _debug suffix in the stem, to keep all further uses of CMAKE_QT_STEM consistent.
+# The _debug suffix is then re-added where needed regardless if it's a debug_and_release build
+# or just debug.
+darwin:!qt_framework:!debug_and_release:CONFIG(debug, debug|release) {
+ CMAKE_QT_STEM = $$replace(CMAKE_QT_STEM, _debug$, )
+}
+
!generated_privates {
isEmpty(SYNCQT.INJECTED_PRIVATE_HEADER_FILES):isEmpty(SYNCQT.PRIVATE_HEADER_FILES): \
CMAKE_NO_PRIVATE_INCLUDES = true
@@ -211,18 +221,18 @@ CMAKE_INTERFACE_QT5_MODULE_DEPS = $$join(aux_lib_deps, ";")
mac {
!isEmpty(CMAKE_STATIC_TYPE) {
- CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.a
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
- CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.prl
+ CMAKE_PRL_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.prl
CMAKE_PRL_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.prl
} else {
qt_framework {
- CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
+ CMAKE_LIB_FILE_LOCATION_DEBUG = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}_debug
CMAKE_LIB_FILE_LOCATION_RELEASE = $${CMAKE_QT_STEM}.framework/$${CMAKE_QT_STEM}
CMAKE_BUILD_IS_FRAMEWORK = "true"
} else {
- CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
+ CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.$$eval(QT.$${MODULE}.VERSION).dylib
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.$$eval(QT.$${MODULE}.VERSION).dylib
}
}
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
index 1c4994c30f..ba7d9575c0 100644
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
@@ -56,10 +56,17 @@ function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configura
get_filename_component(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/lib\" ABSOLUTE)
if(EXISTS \"${prl_file_location}\")
- file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS[ \\t]*=\")
- string(REGEX REPLACE \"QMAKE_PRL_LIBS[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends ${_prl_strings})
- string(REGEX REPLACE \"[ \\t]+\" \";\" _static_depends ${_static_depends})
- string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries ${CMAKE_CXX_STANDARD_LIBRARIES})
+ file(STRINGS \"${prl_file_location}\" _prl_strings REGEX \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=\")
+
+ # file(STRINGS) replaces all semicolons read from the file with backslash semicolons.
+ # We need to do a reverse transformation in CMake. For that we replace all backslash
+ # semicolons with just semicolons, but due to the qmake substitution feature
+ # creating this file, we need to double the amount of backslashes, so the final file
+ # should have three backslashes and one semicolon.
+ string(REGEX REPLACE \"\\\\\\;\" \";\" _prl_strings \"${_prl_strings}\")
+
+ string(REGEX REPLACE \"QMAKE_PRL_LIBS_FOR_CMAKE[ \\t]*=[ \\t]*([^\\n]*)\" \"\\\\1\" _static_depends \"${_prl_strings}\")
+ string(REGEX REPLACE \"[ \\t]+\" \";\" _standard_libraries \"${CMAKE_CXX_STANDARD_LIBRARIES}\")
set(_search_paths)
string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
foreach(_flag ${_static_depends})
diff --git a/mkspecs/features/data/testserver/Dockerfile b/mkspecs/features/data/testserver/Dockerfile
index 8fb664a1d2..a20d289d3f 100644
--- a/mkspecs/features/data/testserver/Dockerfile
+++ b/mkspecs/features/data/testserver/Dockerfile
@@ -21,7 +21,9 @@ RUN echo "#!/usr/bin/env bash\n" \
RUN chmod +x startup.sh
# rewrite the default configurations of avahi-daemon
+# Disable IPv6 of avahi-daemon to resolve the unstable connections on Windows
ARG test_domain
RUN sed -i -e "s,#domain-name=local,domain-name=${test_domain:-test-net.qt.local}," \
-e "s,#publish-aaaa-on-ipv4=yes,publish-aaaa-on-ipv4=no," \
+ -e "s,use-ipv6=yes,use-ipv6=no," \
/etc/avahi/avahi-daemon.conf
diff --git a/mkspecs/features/data/testserver/docker-compose-common.yml b/mkspecs/features/data/testserver/docker-compose-common.yml
new file mode 100644
index 0000000000..58282c1273
--- /dev/null
+++ b/mkspecs/features/data/testserver/docker-compose-common.yml
@@ -0,0 +1,38 @@
+version: '2.1'
+
+# This is a template docker-compose file shared with all modules. It is based
+# on 'extending services' feature of compose file version 2.1.
+# See https://docs.docker.com/compose/extends/#extending-services for details.
+#
+# Example: testserver/docker-compose.yml
+# services:
+# foo:
+# extends:
+# file: ${SHARED_DATA}/docker-compose-common.yml
+# service: ${SHARED_SERVICE}
+# container_name: qt-test-server-foo
+# hostname: ${HOST_NAME:-foo}
+# build:
+# context: .
+# args:
+# provisioningImage: qt-test-server-foo:537fe302f61851d1663...
+# serviceDir: ./foo
+# command: service/foo.sh
+
+x-services:
+ &default-service
+ domainname: ${TEST_DOMAIN}
+ build:
+ context: .
+ dockerfile: ${SHARED_DATA}/Dockerfile
+ args:
+ test_domain: ${TEST_DOMAIN}
+ entrypoint: ./startup.sh
+
+services:
+ bridge-network: *default-service
+ host-network:
+ << : *default-service
+ network_mode: "host"
+ extra_hosts:
+ - "qt-test-server.${TEST_DOMAIN}:${MACHINE_IP}"
diff --git a/mkspecs/features/ltcg.prf b/mkspecs/features/ltcg.prf
index 43ba482954..10d14dfe85 100644
--- a/mkspecs/features/ltcg.prf
+++ b/mkspecs/features/ltcg.prf
@@ -1,4 +1,6 @@
-CONFIG(release, debug|release) {
+static:no-static-ltcg {
+ # Static library but no-static-ltcg enabled: skip LTCG
+} else: CONFIG(release, debug|release) {
# We need fat object files when creating static libraries on some platforms
# so the linker will know to load a particular object from the library
# in the first place. On others, we have special ar and nm to create the symbol
@@ -22,7 +24,7 @@ CONFIG(release, debug|release) {
}
}
- fat-lto {
+ fat-lto|if(static:fat-static-lto) {
QMAKE_CFLAGS_LTCG += $$QMAKE_CFLAGS_LTCG_FATOBJECTS
QMAKE_CXXFLAGS_LTCG += $$QMAKE_CXXFLAGS_LTCG_FATOBJECTS
}
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index cb3707cf8c..24512eeb76 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -291,6 +291,12 @@ load(qt_targets)
QMAKE_PKGCONFIG_REQUIRES += $$replace(QT.$${i}.name, ^Qt, Qt$$section(QT.$${i}.VERSION, ., 0, 0))$$qtPlatformTargetSuffix()
isEmpty(QMAKE_PKGCONFIG_DESCRIPTION): \
QMAKE_PKGCONFIG_DESCRIPTION = $$replace(TARGET, ^Qt, "Qt ") module
+ !isEmpty(lib_replace0.match) {
+ pclib_replace0.match = $$lib_replace0.match
+ pclib_replace0.replace = $$QMAKE_PKGCONFIG_LIBDIR/
+ pclib_replace0.CONFIG = path
+ QMAKE_PKGCONFIG_INSTALL_REPLACE += pclib_replace0
+ }
pclib_replace.match = $$lib_replace.match
!isEmpty(lib_replace.replace): \
pclib_replace.replace = $$QMAKE_PKGCONFIG_LIBDIR
@@ -303,6 +309,12 @@ load(qt_targets)
QMAKE_LIBTOOL_LIBDIR = $$[QT_HOST_LIBS]
else: \
QMAKE_LIBTOOL_LIBDIR = "=$$[QT_INSTALL_LIBS/raw]"
+ !isEmpty(lib_replace0.match) {
+ ltlib_replace0.match = $$lib_replace0.match
+ ltlib_replace0.replace = $$QMAKE_LIBTOOL_LIBDIR/
+ ltlib_replace0.CONFIG = path
+ QMAKE_LIBTOOL_INSTALL_REPLACE += ltlib_replace0
+ }
ltlib_replace.match = $$lib_replace.match
!isEmpty(lib_replace.replace): \
ltlib_replace.replace = $$QMAKE_LIBTOOL_LIBDIR
diff --git a/mkspecs/features/unsupported/testserver.prf b/mkspecs/features/unsupported/testserver.prf
index 6507a360c5..32bd4df30c 100644
--- a/mkspecs/features/unsupported/testserver.prf
+++ b/mkspecs/features/unsupported/testserver.prf
@@ -94,29 +94,33 @@ isEmpty(TESTSERVER_VERSION) {
# binds the same port on the host. An alternative solution is to deploy
# the docker environment into VirtualBox using docker-machine.
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
- $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-macOS.yml
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
# The connection configuration for the target machine
MACHINE_CONFIG = $(shell docker-machine config qt-test-server)
# The environment variables passed to the docker-compose file
TEST_ENV = 'MACHINE_IP=$(shell docker-machine ip qt-test-server)'
+ TEST_ENV += 'HOST_NAME=qt-test-server'
TEST_ENV += 'TEST_DOMAIN=$$DNSDOMAIN'
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
+ TEST_ENV += 'SHARED_SERVICE=host-network'
TEST_CMD = env
} else:equals(QMAKE_HOST.os, Windows) {
# There is no docker bridge on Windows. It is impossible to ping a container.
# Use docker-machine to deploy the docker environment into VirtualBox.
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
- $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-for-windows.yml
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-host-network.yml
# The connection configuration for the target machine
MACHINE_CONFIG = (docker-machine config qt-test-server)
# The environment variables passed to the docker-compose file
TEST_ENV = '\$\$env:MACHINE_IP = docker-machine ip qt-test-server;'
+ TEST_ENV += '\$\$env:HOST_NAME = $$shell_quote(\"qt-test-server\");'
TEST_ENV += '\$\$env:TEST_DOMAIN = $$shell_quote(\"$$DNSDOMAIN\");'
TEST_ENV += '\$\$env:SHARED_DATA = $$shell_quote(\"$$PWD/../data/testserver\");'
+ TEST_ENV += '\$\$env:SHARED_SERVICE = $$shell_quote(\"host-network\");'
# Docker-compose CLI environment variables:
# Enable path conversion from Windows-style to Unix-style in volume definitions.
@@ -126,12 +130,18 @@ isEmpty(TESTSERVER_VERSION) {
CONFIG += PowerShell
} else {
isEmpty(TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
- $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose-bridge-network.yml
# The environment variables passed to the docker-compose file
TEST_ENV = 'TEST_DOMAIN=$$DNSDOMAIN'
TEST_ENV += 'SHARED_DATA=$$PWD/../data/testserver'
+ TEST_ENV += 'SHARED_SERVICE=bridge-network'
TEST_CMD = env
}
+
+ # If $$TESTSERVER_COMPOSE_FILE defined by platform doesn't exist, the default
+ # docker-compose.yml is used as a fallback.
+ !exists($$TESTSERVER_COMPOSE_FILE): TESTSERVER_COMPOSE_FILE = \
+ $$dirname(_QMAKE_CONF_)/tests/testserver/docker-compose.yml
!exists($$TESTSERVER_COMPOSE_FILE): error("Invalid TESTSERVER_COMPOSE_FILE specified")
diff --git a/mkspecs/features/win32/dumpcpp.prf b/mkspecs/features/win32/dumpcpp.prf
index c8cb0dd24b..d19da3d077 100644
--- a/mkspecs/features/win32/dumpcpp.prf
+++ b/mkspecs/features/win32/dumpcpp.prf
@@ -22,15 +22,15 @@ dumpcpp_impl.depends += ${QMAKE_FILE_BASE}.h
QMAKE_EXTRA_COMPILERS += dumpcpp_impl
-# Create dependencies from every object file to our generated header files.
-if(isEmpty(BUILDS)|build_pass):have_target:!contains(TEMPLATE, vc.*) {
+# Call dumpcpp the first time if the files do not exist to help find dependencies
+!build_pass:have_target:!contains(TEMPLATE, vc.*) {
for(tlb, TYPELIBS) {
+ tlbCopy = $$replace(tlb, \", )
hdr = $$basename(tlb)
- hdr = $$section(hdr, ., 0, -2).h
- TYPELIB_HEADERS += $$hdr
+ hdr = $$section(hdr, ., 0, -2)
+ tmp_command = $$QMAKE_DUMPCPP $$system_quote($$absolute_path($$tlb, $$_PRO_FILE_PWD_)) \
+ -o $$system_quote($$OUT_PWD/$$hdr)
+ qaxcontainer_compat: tmp_command += -compat
+ !exists($$OUT_PWD/$${hdr}.h): system($$tmp_command)
}
-
- objtgt.target = $(OBJECTS)
- objtgt.depends += $$TYPELIB_HEADERS
- QMAKE_EXTRA_TARGETS += objtgt
}
diff --git a/mkspecs/features/win32/windows_vulkan_sdk.prf b/mkspecs/features/win32/windows_vulkan_sdk.prf
index 6c08e28fe9..2aebbd3b25 100644
--- a/mkspecs/features/win32/windows_vulkan_sdk.prf
+++ b/mkspecs/features/win32/windows_vulkan_sdk.prf
@@ -1,7 +1,7 @@
isEmpty(QMAKE_INCDIR_VULKAN) {
# Pick up the VULKAN_SDK env var set by the LunarG SDK so that the Vulkan
# headers are found out-of-the-box on typical Windows setups.
- QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)\\include
+ QMAKE_INCDIR_VULKAN = $$(VULKAN_SDK)/include
# Do not export the include dir but resolve it on every qmake call.
QMAKE_EXPORT_INCDIR_VULKAN = -