summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/android-clang/qmake.conf2
-rw-r--r--mkspecs/common/g++-win32.conf1
-rw-r--r--mkspecs/common/macx.conf2
-rw-r--r--mkspecs/common/msvc-desktop.conf5
-rw-r--r--mkspecs/common/msvc-version.conf8
-rw-r--r--mkspecs/common/qcc-base-qnx-aarch64le.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-armle-v7.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-x86-64.conf2
-rw-r--r--mkspecs/common/qcc-base-qnx-x86.conf2
-rw-r--r--mkspecs/common/qcc-base.conf2
-rw-r--r--mkspecs/features/android/android.prf2
-rw-r--r--mkspecs/features/android/android_deployment_settings.prf5
-rw-r--r--mkspecs/features/android/default_pre.prf3
-rw-r--r--mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in7
-rw-r--r--mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in650
-rw-r--r--mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in11
-rw-r--r--mkspecs/features/data/cmake/Qt5ImportPlugin.cpp.in2
-rw-r--r--mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in114
-rw-r--r--mkspecs/features/entrypoint.prf10
-rw-r--r--mkspecs/features/qt.prf12
-rw-r--r--mkspecs/features/qt_configure.prf5
-rw-r--r--mkspecs/features/qt_helper_lib.prf30
-rw-r--r--mkspecs/features/qt_module.prf8
-rw-r--r--mkspecs/features/qt_module_pris.prf2
-rw-r--r--mkspecs/features/qt_plugin.prf2
-rw-r--r--mkspecs/features/resolve_target.prf7
-rw-r--r--mkspecs/features/resources_functions.prf6
-rw-r--r--mkspecs/features/toolchain.prf18
-rw-r--r--mkspecs/features/uikit/default_pre.prf2
-rw-r--r--mkspecs/features/uikit/qt.prf33
-rw-r--r--mkspecs/features/win32/default_pre.prf2
-rw-r--r--mkspecs/features/win32/idcidl.prf3
-rw-r--r--mkspecs/features/win32/windows.prf11
-rw-r--r--mkspecs/win32-arm64-msvc/qmake.conf (renamed from mkspecs/win32-arm64-msvc2017/qmake.conf)2
-rw-r--r--mkspecs/win32-arm64-msvc/qplatformdefs.h (renamed from mkspecs/win32-arm64-msvc2017/qplatformdefs.h)0
35 files changed, 105 insertions, 870 deletions
diff --git a/mkspecs/android-clang/qmake.conf b/mkspecs/android-clang/qmake.conf
index 380a3ab60a..2ee64f3e2a 100644
--- a/mkspecs/android-clang/qmake.conf
+++ b/mkspecs/android-clang/qmake.conf
@@ -44,7 +44,7 @@ isEmpty(ALL_ANDROID_ABIS): ALL_ANDROID_ABIS = arm64-v8a armeabi-v7a x86_64 x86
CONFIG += $$ANDROID_PLATFORM
ANDROID_MIN_SDK_VERSION = $$replace(ANDROID_PLATFORM, "android-", "")
-ANDROID_TARGET_SDK_VERSION = 28
+ANDROID_TARGET_SDK_VERSION = 29
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
diff --git a/mkspecs/common/g++-win32.conf b/mkspecs/common/g++-win32.conf
index a1e08ed63b..67ad1e3b8c 100644
--- a/mkspecs/common/g++-win32.conf
+++ b/mkspecs/common/g++-win32.conf
@@ -63,7 +63,6 @@ QMAKE_LIBS_OPENGL = -lglu32 -lopengl32 -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2 = -lgdi32 -luser32
QMAKE_LIBS_OPENGL_ES2_DEBUG = -lgdi32 -luser32
QMAKE_LIBS_COMPAT = -ladvapi32 -lshell32 -lcomdlg32 -luser32 -lgdi32 -lws2_32
-QMAKE_LIBS_QT_ENTRY = -lmingw32 -lqtmain
QMAKE_IDL = midl
QMAKE_LIB = $${CROSS_COMPILE}ar -rc
diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf
index 6a1b076d7d..1f99c8ff5a 100644
--- a/mkspecs/common/macx.conf
+++ b/mkspecs/common/macx.conf
@@ -12,7 +12,7 @@ QMAKE_APPLE_DEVICE_ARCHS = x86_64
# older SDKs we have to keep this.
QT_MAC_SDK_VERSION_MIN = 10.14
-QT_MAC_SDK_VERSION_MAX = 10.15
+QT_MAC_SDK_VERSION_MAX = 11.0
device.sdk = macosx
device.target = device
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index a5993287ed..68980ff5cf 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -85,8 +85,8 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT
-QMAKE_LFLAGS_RELEASE = /OPT:REF /INCREMENTAL:NO
-QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /DEBUG /OPT:REF /INCREMENTAL:NO
+QMAKE_LFLAGS_RELEASE = /OPT:REF /OPT:ICF /INCREMENTAL:NO
+QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = $$QMAKE_LFLAGS_RELEASE /DEBUG
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS
@@ -105,7 +105,6 @@ QMAKE_LIBS_OPENGL = glu32.lib opengl32.lib gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2 = gdi32.lib user32.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = gdi32.lib user32.lib
QMAKE_LIBS_COMPAT = advapi32.lib shell32.lib comdlg32.lib user32.lib gdi32.lib ws2_32.lib
-QMAKE_LIBS_QT_ENTRY = -lqtmain
QMAKE_IDL = midl
QMAKE_LIB = lib /NOLOGO
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 046f803b75..26ff635e65 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -78,7 +78,7 @@ greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
COMPAT_MKSPEC = win32-msvc2017
- QMAKE_CXXFLAGS += -Zc:referenceBinding
+ QMAKE_CXXFLAGS += -permissive-
# Only Visual Studio 2017 version 15.3 / Visual C++ 19.11 & up have support
# for AVX-512. We enable the switches anyway and let configure check if they
@@ -93,11 +93,6 @@ greaterThan(QMAKE_MSC_VER, 1909) {
QMAKE_CFLAGS_AVX512IFMA = -arch:AVX512
QMAKE_CFLAGS_AVX512VBMI = -arch:AVX512
- # For now permissive fails as soon as UWP API comes into play. In qtbase this
- # API is used in direct2d, but also in multimedia, positioning and sensors.
- # We can try again with a later version of Visual Studio.
- # QMAKE_CXXFLAGS_STRICTCXX = -permissive-
-
# MSVC partially supports the following, but '__cplusplus' definition is set
# as for C++98 until MSVC fully conforms with C++14, see
# https://developercommunity.visualstudio.com/content/problem/139261/msvc-incorrectly-defines-cplusplus.html
@@ -119,6 +114,7 @@ greaterThan(QMAKE_MSC_VER, 1919) {
MSVC_VER = 16.0
QMAKE_CXXFLAGS_CXX2A = -std:c++latest
+ QMAKE_CXXFLAGS += -Zc:externConstexpr
}
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/common/qcc-base-qnx-aarch64le.conf b/mkspecs/common/qcc-base-qnx-aarch64le.conf
index 914ef33f37..92eff22954 100644
--- a/mkspecs/common/qcc-base-qnx-aarch64le.conf
+++ b/mkspecs/common/qcc-base-qnx-aarch64le.conf
@@ -8,7 +8,7 @@ include(g++-unix.conf)
include(unix.conf)
QMAKE_CC = qcc -Vgcc_ntoaarch64le
-QMAKE_CXX = qcc -Vgcc_ntoaarch64le
+QMAKE_CXX = q++ -Vgcc_ntoaarch64le
QNX_CPUDIR = aarch64le
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base-qnx-armle-v7.conf b/mkspecs/common/qcc-base-qnx-armle-v7.conf
index ad3bb33da4..25b8bbc808 100644
--- a/mkspecs/common/qcc-base-qnx-armle-v7.conf
+++ b/mkspecs/common/qcc-base-qnx-armle-v7.conf
@@ -9,7 +9,7 @@ include(unix.conf)
include(g++-unix.conf)
QMAKE_CC = qcc -Vgcc_ntoarmv7le
-QMAKE_CXX = qcc -Vgcc_ntoarmv7le
+QMAKE_CXX = q++ -Vgcc_ntoarmv7le
QNX_CPUDIR = armle-v7
QMAKE_CFLAGS += -mfpu=neon
diff --git a/mkspecs/common/qcc-base-qnx-x86-64.conf b/mkspecs/common/qcc-base-qnx-x86-64.conf
index fd04104f71..8e77b5b660 100644
--- a/mkspecs/common/qcc-base-qnx-x86-64.conf
+++ b/mkspecs/common/qcc-base-qnx-x86-64.conf
@@ -8,7 +8,7 @@ include(g++-unix.conf)
include(unix.conf)
QMAKE_CC = qcc -Vgcc_ntox86_64
-QMAKE_CXX = qcc -Vgcc_ntox86_64
+QMAKE_CXX = q++ -Vgcc_ntox86_64
QNX_CPUDIR = x86_64
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base-qnx-x86.conf b/mkspecs/common/qcc-base-qnx-x86.conf
index 37a5d9ce70..23bc84c3c8 100644
--- a/mkspecs/common/qcc-base-qnx-x86.conf
+++ b/mkspecs/common/qcc-base-qnx-x86.conf
@@ -9,7 +9,7 @@ include(unix.conf)
include(g++-unix.conf)
QMAKE_CC = qcc -Vgcc_ntox86
-QMAKE_CXX = qcc -Vgcc_ntox86
+QMAKE_CXX = q++ -Vgcc_ntox86
QNX_CPUDIR = x86
include(qcc-base-qnx.conf)
diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf
index 24ee29b6b8..b13e3b55bd 100644
--- a/mkspecs/common/qcc-base.conf
+++ b/mkspecs/common/qcc-base.conf
@@ -38,7 +38,6 @@ QMAKE_CFLAGS_SHANI += -msha
QMAKE_CFLAGS_STACK_PROTECTOR_STRONG = -fstack-protector-strong
-QMAKE_CXXFLAGS += $$QMAKE_CFLAGS -lang-c++
QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF
@@ -56,4 +55,3 @@ QMAKE_CFLAGS_USE_PRECOMPILE = -Wc,-include -Wc,${QMAKE_PCH_OUTPUT_BASE}
QMAKE_CXXFLAGS_PRECOMPILE = -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-QMAKE_LFLAGS += -lang-c++
diff --git a/mkspecs/features/android/android.prf b/mkspecs/features/android/android.prf
index ddb94ea22b..7f7fec85f7 100644
--- a/mkspecs/features/android/android.prf
+++ b/mkspecs/features/android/android.prf
@@ -4,7 +4,7 @@ TARGET_FOR_ANDROID_DEPLOYMENT_SETTINGS = $$TARGET
!contains(TEMPLATE, subdirs): {
apk_install_target.target = apk_install_target
apk_install_target.depends = first
- apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$OUT_PWD/android-build install
+ apk_install_target.commands = $(MAKE) -f $(MAKEFILE) INSTALL_ROOT=$$shell_path($$OUT_PWD/android-build) install
qtPrepareTool(ANDROIDDEPLOYQT, androiddeployqt)
isEmpty(ANDROID_DEPLOYMENT_SETTINGS_FILE): ANDROID_DEPLOYMENT_SETTINGS_FILE = $$OUT_PWD/android-$$TARGET-deployment-settings.json
diff --git a/mkspecs/features/android/android_deployment_settings.prf b/mkspecs/features/android/android_deployment_settings.prf
index 23caae2f4d..c351aa5e69 100644
--- a/mkspecs/features/android/android_deployment_settings.prf
+++ b/mkspecs/features/android/android_deployment_settings.prf
@@ -1,7 +1,7 @@
contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
defineReplace(emitString) {
- return("\"$$replace(1, \\\\, \\\\)\"")
+ return("\"$$clean_path($$1)\"")
}
FILE_CONTENT = "{"
@@ -62,6 +62,9 @@ contains(TEMPLATE, ".*app"):!build_pass:!android-embedded {
!isEmpty(ANDROID_EXTRA_LIBS): \
FILE_CONTENT += " \"android-extra-libs\": $$emitString($$join(ANDROID_EXTRA_LIBS, ",")),"
+ FILE_CONTENT += " \"qml-importscanner-binary\": $$emitString($$[QT_HOST_BINS]/qmlimportscanner),"
+ FILE_CONTENT += " \"rcc-binary\": $$emitString($$[QT_HOST_BINS]/rcc),"
+
qml_import_paths = $$(QML2_IMPORT_PATH)
qml_import_paths = $$split(qml_import_paths, $$DIRLIST_SEPARATOR)
qml_import_paths += $$QML_IMPORT_PATH
diff --git a/mkspecs/features/android/default_pre.prf b/mkspecs/features/android/default_pre.prf
index eaa2b0c666..9f90dcb391 100644
--- a/mkspecs/features/android/default_pre.prf
+++ b/mkspecs/features/android/default_pre.prf
@@ -36,6 +36,9 @@ QMAKE_CFLAGS += -fno-limit-debug-info
QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS
+equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
+ QMAKE_LINK += -Wl,--exclude-libs,libunwind.a
+
ANDROID_STDCPP_PATH = $$NDK_LLVM_PATH/sysroot/usr/lib/
# -fstack-protector-strong offers good protection against stack smashing attacks.
diff --git a/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in b/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
deleted file mode 100644
index ec8075f3f7..0000000000
--- a/mkspecs/features/data/cmake/ExtraSourceIncludes.cmake.in
+++ /dev/null
@@ -1,7 +0,0 @@
-
-list(APPEND _Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
- $$CMAKE_SOURCE_INCLUDES
-)
-set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- $$CMAKE_SOURCE_PRIVATE_INCLUDES
-)
diff --git a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in b/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
deleted file mode 100644
index db18dbece6..0000000000
--- a/mkspecs/features/data/cmake/Qt5BasicConfig.cmake.in
+++ /dev/null
@@ -1,650 +0,0 @@
-if (CMAKE_VERSION VERSION_LESS 3.1.0)
- message(FATAL_ERROR \"Qt 5 $${CMAKE_MODULE_NAME} module requires at least CMake version 3.1.0\")
-endif()
-
-!!IF !isEmpty(CMAKE_USR_MOVE_WORKAROUND)
-!!IF !isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-!!ELSE
-get_filename_component(_IMPORT_PREFIX \"${CMAKE_CURRENT_LIST_FILE}\" PATH)
-# Use original install prefix when loaded through a
-# cross-prefix symbolic link such as /lib -> /usr/lib.
-get_filename_component(_realCurr \"${_IMPORT_PREFIX}\" REALPATH)
-get_filename_component(_realOrig \"$$CMAKE_INSTALL_LIBS_DIR/cmake/Qt5$${CMAKE_MODULE_NAME}\" REALPATH)
-if(_realCurr STREQUAL _realOrig)
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$CMAKE_INSTALL_LIBS_DIR/$${CMAKE_RELATIVE_INSTALL_LIBS_DIR}\" ABSOLUTE)
-else()
- get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
-endif()
-unset(_realOrig)
-unset(_realCurr)
-unset(_IMPORT_PREFIX)
-!!ENDIF
-!!ELIF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-get_filename_component(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"${CMAKE_CURRENT_LIST_DIR}/$${CMAKE_RELATIVE_INSTALL_DIR}\" ABSOLUTE)
-!!ELSE
-set(_qt5$${CMAKE_MODULE_NAME}_install_prefix \"$$[QT_INSTALL_PREFIX]\")
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
-# For backwards compatibility only. Use Qt5$${CMAKE_MODULE_NAME}_VERSION instead.
-set(Qt5$${CMAKE_MODULE_NAME}_VERSION_STRING "$$eval(QT.$${MODULE}.VERSION)")
-
-set(Qt5$${CMAKE_MODULE_NAME}_LIBRARIES Qt5::$${CMAKE_MODULE_NAME})
-!!ENDIF // TEMPLATE != aux
-
-macro(_qt5_$${CMAKE_MODULE_NAME}_check_file_exists file)
- if(NOT EXISTS \"${file}\" )
- message(FATAL_ERROR \"The imported target \\\"Qt5::$${CMAKE_MODULE_NAME}\\\" references the file
- \\\"${file}\\\"
-but this file does not exist. Possible reasons include:
-* The file was deleted, renamed, or moved to another location.
-* An install or uninstall procedure did not complete successfully.
-* The installation package was faulty and contained
- \\\"${CMAKE_CURRENT_LIST_FILE}\\\"
-but not all the files it references.
-\")
- endif()
-endmacro()
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
-function(_qt5_$${CMAKE_MODULE_NAME}_process_prl_file prl_file_location Configuration lib_deps link_flags)
- set(_lib_deps)
- set(_link_flags)
-
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(_qt5_install_libs \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}\")
-!!ELSE
- set(_qt5_install_libs \"$${CMAKE_LIB_DIR}\")
-!!ENDIF
-
- if(EXISTS \"${prl_file_location}\")
- 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)
- set(_fw_search_paths)
- set(_framework_flag)
- string(REPLACE \"\\$\\$[QT_INSTALL_LIBS]\" \"${_qt5_install_libs}\" _static_depends \"${_static_depends}\")
- foreach(_flag ${_static_depends})
- string(REPLACE \"\\\"\" \"\" _flag ${_flag})
- if(_flag MATCHES \"^-framework$\")
- # Handle the next flag as framework name
- set(_framework_flag 1)
- elseif(_flag MATCHES \"^-F(.*)$\")
- # Handle -F/foo/bar flags by recording the framework search paths to be used
- # by find_library.
- list(APPEND _fw_search_paths \"${CMAKE_MATCH_1}\")
- elseif(_framework_flag OR _flag MATCHES \"^-l(.*)$\")
- if(_framework_flag)
- # Handle Darwin framework bundles passed as -framework Foo
- set(_lib ${_flag})
- else()
- # Handle normal libraries passed as -lfoo
- set(_lib \"${CMAKE_MATCH_1}\")
- foreach(_standard_library ${_standard_libraries})
- if(_standard_library MATCHES \"^${_lib}(\\\\.lib)?$\")
- set(_lib_is_default_linked TRUE)
- break()
- endif()
- endforeach()
- endif()
- if (_lib_is_default_linked)
- unset(_lib_is_default_linked)
- elseif(_lib MATCHES \"^pthread$\")
- find_package(Threads REQUIRED)
- list(APPEND _lib_deps Threads::Threads)
- else()
- set(current_search_paths \"${_search_paths}\")
- if(_framework_flag)
- set(current_search_paths \"${_fw_search_paths}\")
- endif()
- if(current_search_paths)
- find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${current_search_paths} NO_DEFAULT_PATH)
- endif()
- find_library(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH ${_lib} HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})
- mark_as_advanced(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
- if(_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH)
- list(APPEND _lib_deps
- ${_Qt5$${CMAKE_MODULE_NAME}_${Configuration}_${_lib}_PATH}
- )
- else()
- message(FATAL_ERROR \"Library not found: ${_lib}\")
- endif()
- unset(_framework_flag)
- endif()
- elseif(EXISTS \"${_flag}\")
- # The flag is an absolute path to an existing library
- list(APPEND _lib_deps \"${_flag}\")
- elseif(_flag MATCHES \"^-L(.*)$\")
- # Handle -Lfoo flags by putting their paths in the search path used by find_library above
- list(APPEND _search_paths \"${CMAKE_MATCH_1}\")
- else()
- # Handle all remaining flags by simply passing them to the linker
- list(APPEND _link_flags ${_flag})
- endif()
- endforeach()
- endif()
-
- string(REPLACE \";\" \" \" _link_flags \"${_link_flags}\")
- set(${lib_deps} ${_lib_deps} PARENT_SCOPE)
- set(${link_flags} \"SHELL:${_link_flags}\" PARENT_SCOPE)
-endfunction()
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
-macro(_populate_$${CMAKE_MODULE_NAME}_target_properties Configuration LIB_LOCATION IMPLIB_LOCATION
- IsDebugAndRelease)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
-!!ELSE
- set(imported_location \"$${CMAKE_DLL_DIR}${LIB_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
- set(_deps
- ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}
- )
- set(_static_deps
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- ${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LIB_DEPENDENCIES}
-!!ENDIF
- )
-
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
-!!IF !isEmpty(CMAKE_LIB_SONAME)
- \"IMPORTED_SONAME_${Configuration}\" \"$${CMAKE_LIB_SONAME}\"
-!!ENDIF
- # For backward compatibility with CMake < 2.8.12
- \"IMPORTED_LINK_INTERFACE_LIBRARIES_${Configuration}\" \"${_deps};${_static_deps}\"
- )
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_deps}\"
- )
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- if(NOT "${IsDebugAndRelease}")
- set(_genex_condition \"1\")
- else()
- if("${Configuration}" STREQUAL "DEBUG")
- set(_genex_condition \"$<CONFIG:Debug>\")
- else()
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
- endif()
- endif()
-
- if(_static_deps)
- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_deps_genex}\"
- )
- endif()
-
- set(_static_link_flags \"${_Qt5$${CMAKE_MODULE_NAME}_STATIC_${Configuration}_LINK_FLAGS}\")
- if(_static_link_flags)
- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_OPTIONS
- \"${_static_link_flags_genex}\"
- )
- else()
- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_link_flags_genex}\"
- )
- endif()
- endif()
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- set(imported_implib \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
-!!ELSE
- set(imported_implib \"IMPORTED_IMPLIB_${Configuration}\" \"$${CMAKE_LIB_DIR}${IMPLIB_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_implib})
- if(NOT \"${IMPLIB_LOCATION}\" STREQUAL \"\")
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- \"IMPORTED_IMPLIB_${Configuration}\" ${imported_implib}
- )
- endif()
-!!ENDIF
-endmacro()
-!!ENDIF
-
-if (NOT TARGET Qt5::$${CMAKE_MODULE_NAME})
-
-!!IF !no_module_headers
-!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Headers\"
- )
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_QT_STEM}.framework/Versions/$$section(VERSION, ., 0, 0)/Headers/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ELSE
-!!IF isEmpty(CMAKE_INCLUDE_DIR_IS_ABSOLUTE)
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$$CMAKE_INCLUDE_DIR\" \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}\")
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ELSE
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"$$CMAKE_INCLUDE_DIR\" \"$${CMAKE_INCLUDE_DIR}$${CMAKE_INCLUDE_NAME}\")
-!!IF isEmpty(CMAKE_NO_PRIVATE_INCLUDES)
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS
- \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION\"
- \"$${CMAKE_INCLUDE_DIR}$${MODULE_INCNAME}/$$VERSION/$${MODULE_INCNAME}\"
- )
-!!ELSE
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-!!ENDIF
-!!ENDIF
-!!IF !isEmpty(CMAKE_ADD_SOURCE_INCLUDE_DIRS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/ExtraSourceIncludes.cmake\" OPTIONAL)
-!!ENDIF
-!!ELSE
- set(_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS \"\")
- set(Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"\")
-!!ENDIF
-
- foreach(_dir ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
- endforeach()
-
-!!IF isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- # Only check existence of private includes if the Private component is
- # specified.
- list(FIND Qt5$${CMAKE_MODULE_NAME}_FIND_COMPONENTS Private _check_private)
- if (NOT _check_private STREQUAL -1)
- foreach(_dir ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${_dir})
- endforeach()
- endif()
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
-
- set(Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS -D$${MODULE_DEFINE})
- set(Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS $${MODULE_DEFINES})
-!!ENDIF // TEMPLATE != aux
- set(_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_MODULE_DEPS}\")
-
-!!IF !isEmpty(CMAKE_INTERFACE_MODULE_DEPS)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_INTERFACE_MODULE_DEPS}\")
-!!ENDIF
-
- set(Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS ${Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS})
-
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_REQUIRED)
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED REQUIRED)
- endif()
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_QUIET)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_QUIETLY)
- set(_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET QUIET)
- endif()
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
- if (Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT)
- set(_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT EXACT)
- endif()
-
-!!IF !equals(TEMPLATE, aux)
- set(Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS \"\")
-!!ENDIF // TEMPLATE != aux
-
- foreach(_module_dep ${_Qt5$${CMAKE_MODULE_NAME}_MODULE_DEPENDENCIES})
- if (NOT Qt5${_module_dep}_FOUND)
- find_package(Qt5${_module_dep}
- $$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
- ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
- ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
- PATHS \"${CMAKE_CURRENT_LIST_DIR}/..\" NO_DEFAULT_PATH
- )
- endif()
-
- if (NOT Qt5${_module_dep}_FOUND)
- set(Qt5$${CMAKE_MODULE_NAME}_FOUND False)
- return()
- endif()
-
-!!IF !equals(TEMPLATE, aux)
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS \"${Qt5${_module_dep}_INCLUDE_DIRS}\")
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS \"${Qt5${_module_dep}_PRIVATE_INCLUDE_DIRS}\")
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS ${Qt5${_module_dep}_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS ${Qt5${_module_dep}_COMPILE_DEFINITIONS})
- list(APPEND Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS ${Qt5${_module_dep}_EXECUTABLE_COMPILE_FLAGS})
-!!ENDIF // TEMPLATE != aux
- endforeach()
-!!IF !equals(TEMPLATE, aux)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_PRIVATE_INCLUDE_DIRS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_COMPILE_DEFINITIONS)
- list(REMOVE_DUPLICATES Qt5$${CMAKE_MODULE_NAME}_EXECUTABLE_COMPILE_FLAGS)
-!!ENDIF // TEMPLATE != aux
-
- # It can happen that the same FooConfig.cmake file is included when calling find_package()
- # on some Qt component. An example of that is when using a Qt static build with auto inclusion
- # of plugins:
- #
- # Qt5WidgetsConfig.cmake -> Qt5GuiConfig.cmake -> Qt5Gui_QSvgIconPlugin.cmake ->
- # Qt5SvgConfig.cmake -> Qt5WidgetsConfig.cmake ->
- # finish processing of second Qt5WidgetsConfig.cmake ->
- # return to first Qt5WidgetsConfig.cmake ->
- # add_library cannot create imported target "Qt5::Widgets".
- #
- # Make sure to return early in the original Config inclusion, because the target has already
- # been defined as part of the second inclusion.
- if(TARGET Qt5::$${CMAKE_MODULE_NAME})
- return()
- endif()
-
- set(_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_QT5_MODULE_DEPS}\")
-
-!!IF !isEmpty(CMAKE_INTERFACE_QT5_MODULE_DEPS)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES \"$${CMAKE_INTERFACE_QT5_MODULE_DEPS}\")
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- if(NOT Qt5_EXCLUDE_STATIC_DEPENDENCIES)
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
- )
-!!ELSE
- _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_DEBUG_LINK_FLAGS
- )
-!!ENDIF
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
- )
-!!ELSE
- _qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_LIB_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_MODULE_NAME}_STATIC_RELEASE_LINK_FLAGS
- )
-!!ENDIF
-!!ENDIF
- endif()
-
-!!IF equals(TEMPLATE, aux)
- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
-!!ELSE
- add_library(Qt5::$${CMAKE_MODULE_NAME} STATIC IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CXX")
-!!ENDIF
-!!ELSE
-!!IF equals(TEMPLATE, aux)
- add_library(Qt5::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
-!!ELSE
- add_library(Qt5::$${CMAKE_MODULE_NAME} SHARED IMPORTED)
-!!ENDIF
-!!ENDIF
-
-!!IF !equals(TEMPLATE, aux)
-!!IF !isEmpty(CMAKE_BUILD_IS_FRAMEWORK)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY FRAMEWORK 1)
-!!ENDIF
-!!ENDIF // TEMPLATE != aux
-
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${_Qt5$${CMAKE_MODULE_NAME}_OWN_INCLUDE_DIRS})
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY
- INTERFACE_COMPILE_DEFINITIONS $${MODULE_DEFINES})
-
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_ENABLED_FEATURES $$join(QT.$${MODULE}.enabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_DISABLED_FEATURES $$join(QT.$${MODULE}.disabled_features, ";"))
-
- # Qt 6 forward compatible properties.
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
- PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PUBLIC_FEATURES
- $$join(QT.$${MODULE}.enabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
- PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PUBLIC_FEATURES
- $$join(QT.$${MODULE}.disabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
- PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_ENABLED_PRIVATE_FEATURES
- $$join(QT.$${MODULE}_private.enabled_features, ";"))
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}
- PROPERTY $${CMAKE_FEATURE_PROPERTY_PREFIX}QT_DISABLED_PRIVATE_FEATURES
- $$join(QT.$${MODULE}_private.disabled_features, ";"))
-
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} PROPERTY INTERFACE_QT_PLUGIN_TYPES \"$${CMAKE_MODULE_PLUGIN_TYPES}\")
-
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST TRUE)
- foreach (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS})
- if (NOT EXISTS ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIR})
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST FALSE)
- endif()
- endforeach()
-
- if (_Qt5$${CMAKE_MODULE_NAME}_PRIVATE_DIRS_EXIST)
- add_library(Qt5::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_INCLUDE_DIRECTORIES ${Qt5$${CMAKE_MODULE_NAME}_OWN_PRIVATE_INCLUDE_DIRS}
- )
- set(_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS)
- foreach(dep ${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES})
- if (TARGET ${dep}Private)
- list(APPEND _Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS ${dep}Private)
- endif()
- endforeach()
- set_property(TARGET Qt5::$${CMAKE_MODULE_NAME}Private PROPERTY
- INTERFACE_LINK_LIBRARIES Qt5::$${CMAKE_MODULE_NAME} ${_Qt5$${CMAKE_MODULE_NAME}_PRIVATEDEPS}
- )
-
- # Add a versionless target, for compatibility with Qt6.
- if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND NOT TARGET Qt::$${CMAKE_MODULE_NAME}Private)
- add_library(Qt::$${CMAKE_MODULE_NAME}Private INTERFACE IMPORTED)
- set_target_properties(Qt::$${CMAKE_MODULE_NAME}Private PROPERTIES
- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}Private\"
- )
- endif()
- endif()
-
-!!IF !equals(TEMPLATE, aux)
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-
-!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
-!!IF isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
- if (EXISTS
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
-!!ELSE
- \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\"
-!!ENDIF
- AND EXISTS
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ELSE
- \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" )
-!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
- endif()
-!!ENDIF // CMAKE_DEBUG_TYPE
-!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-
-!!ENDIF // CMAKE_RELEASE_TYPE
-
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(DEBUG \"$${CMAKE_LIB_FILE_LOCATION_DEBUG}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
-
-!!IF !isEmpty(CMAKE_FIND_OTHER_LIBRARY_BUILD)
-!!IF isEmpty(CMAKE_RELEASE_TYPE)
-!!IF !isEmpty(CMAKE_STATIC_WINDOWS_BUILD)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- if (EXISTS \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ELSE // CMAKE_LIB_DIR_IS_ABSOLUTE
- if (EXISTS \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF // CMAKE_LIB_DIR_IS_ABSOLUTE
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" \"\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ELSE // CMAKE_STATIC_WINDOWS_BUILD
- if (EXISTS
-!!IF isEmpty(CMAKE_DLL_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_DLL_DIR}$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-!!ELSE
- \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\"
-!!ENDIF
- AND EXISTS
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_LIB_DIR}$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ELSE
- \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" )
-!!ENDIF
- _populate_$${CMAKE_MODULE_NAME}_target_properties(RELEASE \"$${CMAKE_LIB_FILE_LOCATION_RELEASE}\" \"$${CMAKE_IMPLIB_FILE_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF // CMAKE_STATIC_WINDOWS_BUILD
- endif()
-!!ENDIF // CMAKE_RELEASE_TYPE
-!!ENDIF // CMAKE_FIND_OTHER_LIBRARY_BUILD
-
-!!ENDIF // CMAKE_DEBUG_TYPE
-!!ELSE // TEMPLATE != aux
- set_target_properties(Qt5::$${CMAKE_MODULE_NAME} PROPERTIES
- INTERFACE_LINK_LIBRARIES \"${_Qt5$${CMAKE_MODULE_NAME}_LIB_DEPENDENCIES}\"
- )
-!!ENDIF // TEMPLATE != aux
-
-!!IF isEmpty(CMAKE_INTERNAL_MODULE)
- # In Qt 5.15 the glob pattern was relaxed to also catch plugins not literally named "Plugin".
- # Define QT5_STRICT_PLUGIN_GLOB or ModuleName_STRICT_PLUGIN_GLOB to revert to old behavior.
- if (QT5_STRICT_PLUGIN_GLOB OR Qt5$${CMAKE_MODULE_NAME}_STRICT_PLUGIN_GLOB)
- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*Plugin.cmake\")
- else()
- file(GLOB pluginTargets \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_*.cmake\")
- endif()
-
- macro(_populate_$${CMAKE_MODULE_NAME}_plugin_properties Plugin Configuration PLUGIN_LOCATION
- IsDebugAndRelease)
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY IMPORTED_CONFIGURATIONS ${Configuration})
-
-!!IF isEmpty(CMAKE_PLUGIN_DIR_IS_ABSOLUTE)
- set(imported_location \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ELSE
- set(imported_location \"$${CMAKE_PLUGIN_DIR}${PLUGIN_LOCATION}\")
-!!ENDIF
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(${imported_location})
- set_target_properties(Qt5::${Plugin} PROPERTIES
- \"IMPORTED_LOCATION_${Configuration}\" ${imported_location}
- )
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
- set(_static_deps
- ${_Qt5${Plugin}_STATIC_${Configuration}_LIB_DEPENDENCIES}
- )
-
- if(NOT "${IsDebugAndRelease}")
- set(_genex_condition \"1\")
- else()
- if("${Configuration}" STREQUAL "DEBUG")
- set(_genex_condition \"$<CONFIG:Debug>\")
- else()
- set(_genex_condition \"$<NOT:$<CONFIG:Debug>>\")
- endif()
- endif()
- if(_static_deps)
- set(_static_deps_genex \"$<${_genex_condition}:${_static_deps}>\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_deps_genex}\"
- )
- endif()
-
- set(_static_link_flags \"${_Qt5${Plugin}_STATIC_${Configuration}_LINK_FLAGS}\")
- if(_static_link_flags)
- set(_static_link_flags_genex \"$<${_genex_condition}:${_static_link_flags}>\")
- if(NOT CMAKE_VERSION VERSION_LESS \"3.13\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_OPTIONS
- \"${_static_link_flags_genex}\"
- )
- else()
- # Abuse INTERFACE_LINK_LIBRARIES to add link flags when CMake version is too low.
- # Strip out SHELL:, because it is not supported in this property. And hope for the best.
- string(REPLACE \"SHELL:\" \"\" _static_link_flags_genex \"${_static_link_flags_genex}\")
- set_property(TARGET Qt5::${Plugin} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"${_static_link_flags_genex}\"
- )
- endif()
- endif()
-!!ENDIF
- endmacro()
-
- if (pluginTargets)
- foreach(pluginTarget ${pluginTargets})
- include(${pluginTarget})
- endforeach()
- endif()
-!!ENDIF // isEmpty(CMAKE_INTERNAL_MODULE)
-
-!!IF !isEmpty(CMAKE_MODULE_EXTRAS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigExtras.cmake\")
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_MODULE_MACROS)
- include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}Macros.cmake\")
-!!ENDIF
-
- _qt5_$${CMAKE_MODULE_NAME}_check_file_exists(\"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}ConfigVersion.cmake\")
-endif()
-
-# Add a versionless target, for compatibility with Qt6.
-if(NOT \"${QT_NO_CREATE_VERSIONLESS_TARGETS}\" AND TARGET Qt5::$${CMAKE_MODULE_NAME} AND NOT TARGET Qt::$${CMAKE_MODULE_NAME})
- add_library(Qt::$${CMAKE_MODULE_NAME} INTERFACE IMPORTED)
- set_target_properties(Qt::$${CMAKE_MODULE_NAME} PROPERTIES
- INTERFACE_LINK_LIBRARIES \"Qt5::$${CMAKE_MODULE_NAME}\"
- )
-endif()
diff --git a/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in b/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
deleted file mode 100644
index 7c42430e97..0000000000
--- a/mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-
-set(PACKAGE_VERSION $$CMAKE_PACKAGE_VERSION)
-
-if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/mkspecs/features/data/cmake/Qt5ImportPlugin.cpp.in b/mkspecs/features/data/cmake/Qt5ImportPlugin.cpp.in
deleted file mode 100644
index 6e27f7a260..0000000000
--- a/mkspecs/features/data/cmake/Qt5ImportPlugin.cpp.in
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <QtPlugin>
-Q_IMPORT_PLUGIN($$CMAKE_PLUGIN_NAME)
diff --git a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in b/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
deleted file mode 100644
index b550a52c60..0000000000
--- a/mkspecs/features/data/cmake/Qt5PluginTarget.cmake.in
+++ /dev/null
@@ -1,114 +0,0 @@
-
-add_library(Qt5::$$CMAKE_PLUGIN_NAME MODULE IMPORTED)
-
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
-set(_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES \"$${CMAKE_PLUGIN_MODULE_DEPS}\")
-
-foreach(_module_dep ${_Qt5$${CMAKE_PLUGIN_NAME}_MODULE_DEPENDENCIES})
- if(NOT Qt5${_module_dep}_FOUND)
- find_package(Qt5${_module_dep}
- $$VERSION ${_Qt5$${CMAKE_MODULE_NAME}_FIND_VERSION_EXACT}
- ${_Qt5$${CMAKE_MODULE_NAME}_DEPENDENCIES_FIND_QUIET}
- ${_Qt5$${CMAKE_MODULE_NAME}_FIND_DEPENDENCIES_REQUIRED}
- PATHS \"${CMAKE_CURRENT_LIST_DIR}/..\" NO_DEFAULT_PATH
- )
- endif()
-endforeach()
-
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
-)
-!!ELSE
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_RELEASE}\" RELEASE
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_RELEASE_LINK_FLAGS
-)
-!!ENDIF
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-!!IF isEmpty(CMAKE_LIB_DIR_IS_ABSOLUTE)
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"${_qt5$${CMAKE_MODULE_NAME}_install_prefix}/$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
-)
-!!ELSE
-_qt5_$${CMAKE_MODULE_NAME}_process_prl_file(
- \"$${CMAKE_PLUGIN_DIR}$${CMAKE_PRL_FILE_LOCATION_DEBUG}\" DEBUG
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LIB_DEPENDENCIES
- _Qt5$${CMAKE_PLUGIN_NAME}_STATIC_DEBUG_LINK_FLAGS
-)
-!!ENDIF
-!!ENDIF
-
-set_property(TARGET Qt5::$$CMAKE_PLUGIN_NAME PROPERTY INTERFACE_SOURCES
- \"${CMAKE_CURRENT_LIST_DIR}/Qt5$${CMAKE_MODULE_NAME}_$${CMAKE_PLUGIN_NAME}_Import.cpp\"
-)
-!!ENDIF
-
-!!IF !isEmpty(CMAKE_RELEASE_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME RELEASE \"$${CMAKE_PLUGIN_LOCATION_RELEASE}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF
-!!IF !isEmpty(CMAKE_DEBUG_TYPE)
-_populate_$${CMAKE_MODULE_NAME}_plugin_properties($$CMAKE_PLUGIN_NAME DEBUG \"$${CMAKE_PLUGIN_LOCATION_DEBUG}\" $${CMAKE_DEBUG_AND_RELEASE})
-!!ENDIF
-
-list(APPEND Qt5$${CMAKE_MODULE_NAME}_PLUGINS Qt5::$$CMAKE_PLUGIN_NAME)
-set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY QT_ALL_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED} Qt5::$${CMAKE_PLUGIN_NAME})
-!!IF !isEmpty(CMAKE_STATIC_TYPE)
-# $<GENEX_EVAL:...> wasn\'t added until CMake 3.12, so put a version guard around it
-if(CMAKE_VERSION VERSION_LESS \"3.12\")
- set(_manual_plugins_genex \"$<TARGET_PROPERTY:QT_PLUGINS>\")
- set(_plugin_type_genex \"$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>\")
- set(_no_plugins_genex \"$<TARGET_PROPERTY:QT_NO_PLUGINS>\")
-else()
- set(_manual_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS>>\")
- set(_plugin_type_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_PLUGINS_$${CMAKE_PLUGIN_TYPE_ESCAPED}>>\")
- set(_no_plugins_genex \"$<GENEX_EVAL:$<TARGET_PROPERTY:QT_NO_PLUGINS>>\")
-endif()
-set(_user_specified_genex
- \"$<IN_LIST:Qt5::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\"
-)
-set(_user_specified_genex_versionless
- \"$<IN_LIST:Qt::$$CMAKE_PLUGIN_NAME,${_manual_plugins_genex};${_plugin_type_genex}>\"
-)
-string(CONCAT _plugin_genex
- \"$<$<OR:\"
- # Add this plugin if it\'s in the list of manually specified plugins or in the list of
- # explicitly included plugin types.
- \"${_user_specified_genex},\"
- \"${_user_specified_genex_versionless},\"
- # Add this plugin if all of the following are true:
- # 1) the list of explicitly included plugin types is empty
- # 2) the QT_PLUGIN_EXTENDS property for the plugin is empty or equal to the current
- # module name
- # 3) the user hasn\'t explicitly excluded the plugin.
- \"$<AND:\"
- \"$<STREQUAL:${_plugin_type_genex},>,\"
- \"$<OR:\"
- # FIXME: The value of CMAKE_MODULE_NAME seems to be wrong (e.g for Svg plugin
- # it should be Qt::Svg instead of Qt::Gui).
- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,Qt::$${CMAKE_MODULE_NAME}>,\"
- \"$<STREQUAL:$<TARGET_PROPERTY:Qt5::$${CMAKE_PLUGIN_NAME},QT_PLUGIN_EXTENDS>,>\"
- \">,\"
- \"$<NOT:$<IN_LIST:Qt5::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>,\"
- \"$<NOT:$<IN_LIST:Qt::$${CMAKE_PLUGIN_NAME},${_no_plugins_genex}>>\"
- \">\"
- \">:Qt5::$$CMAKE_PLUGIN_NAME>\"
-)
-set_property(TARGET Qt5::$${CMAKE_MODULE_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- ${_plugin_genex}
-)
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} APPEND PROPERTY INTERFACE_LINK_LIBRARIES
- \"$${CMAKE_PLUGIN_QT5_MODULE_DEPS}\"
-)
-!!ENDIF
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_TYPE \"$$CMAKE_PLUGIN_TYPE\")
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_EXTENDS \"$$CMAKE_PLUGIN_EXTENDS\")
-set_property(TARGET Qt5::$${CMAKE_PLUGIN_NAME} PROPERTY QT_PLUGIN_CLASS_NAME \"$$CMAKE_PLUGIN_NAME\")
diff --git a/mkspecs/features/entrypoint.prf b/mkspecs/features/entrypoint.prf
new file mode 100644
index 0000000000..98c41161a0
--- /dev/null
+++ b/mkspecs/features/entrypoint.prf
@@ -0,0 +1,10 @@
+!qt: return()
+
+win32 {
+ !console:contains(TEMPLATE, ".*app"): \
+ QT_PRIVATE += entrypoint_private
+} else:uikit {
+ qt_depends = $$resolve_depends(QT, "QT.")
+ !watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?): \
+ QT_PRIVATE += entrypoint_private
+}
diff --git a/mkspecs/features/qt.prf b/mkspecs/features/qt.prf
index 532a241fc0..55a51293ac 100644
--- a/mkspecs/features/qt.prf
+++ b/mkspecs/features/qt.prf
@@ -169,7 +169,7 @@ defineTest(qtProcessModuleFlags) {
export($$1)
}
-unset(using_privates)
+unset(using_private_headers)
var_sfx =
for(ever) {
# Topological resolution of modules based on their QT.<module>.depends variable
@@ -180,6 +180,7 @@ for(ever) {
MODULE_NAME = $$eval(QT.$${QTLIB}.name)
MODULE_MODULE = $$eval(QT.$${QTLIB}.module)
MODULE_INCLUDES = $$eval(QT.$${QTLIB}.includes)
+ MODULE_LDFLAGS = $$eval(QT.$${QTLIB}.ldflags)
MODULE_LIBS = $$eval(QT.$${QTLIB}.libs)
MODULE_FRAMEWORKS = $$eval(QT.$${QTLIB}.frameworks)
MODULE_USES = $$eval(QT.$${QTLIB}.uses)
@@ -190,8 +191,8 @@ for(ever) {
next()
}
- contains(MODULE_CONFIG, internal_module): \
- using_privates = true
+ contains(MODULE_CONFIG, internal_module):!isEmpty(MODULE_INCLUDES): \
+ using_private_headers = true
contains(MODULE_CONFIG, ltcg): \
CONFIG += link_ltcg
@@ -200,6 +201,9 @@ for(ever) {
MODULE_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
+ # Add linker flags before lib
+ LIBS$$var_sfx += $$MODULE_LDFLAGS
+
# Frameworks shouldn't need include paths, but much code does not use
# module-qualified #includes, so by default we add paths which point
# directly into the frameworks. Private modules have somewhat convoluted
@@ -246,7 +250,7 @@ for(ever) {
!isEmpty(var_sfx): break()
var_sfx = _PRIVATE
}
-!isEmpty(using_privates):!no_private_qt_headers_warning:!build_pass {
+!isEmpty(using_private_headers):!no_private_qt_headers_warning:!build_pass {
message("This project is using private headers and will therefore be tied to this specific Qt module build version.")
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
message("This is not a bug, but a result of using Qt internals. You have been warned!")
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 93448acb91..4c18dbf953 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -340,6 +340,11 @@ defineTest(qtConfParseCommandLine) {
type = boolean
}
+ # Skip the -qmake option.
+ isEmpty(type):contains(opt, "qmake") {
+ next()
+ }
+
isEmpty(type):contains(opt, "skip") {
isEmpty(skipOptionWarningAdded) {
qtConfAddWarning("Command line option -skip is only effective in top-level builds.")
diff --git a/mkspecs/features/qt_helper_lib.prf b/mkspecs/features/qt_helper_lib.prf
index bc20251bd9..964e256ee0 100644
--- a/mkspecs/features/qt_helper_lib.prf
+++ b/mkspecs/features/qt_helper_lib.prf
@@ -89,4 +89,32 @@ TARGET = $$THE_TARGET
# In static builds of Qt, convenience libraries must be installed,
# as in this case they are not linked to the final library/plugin.
-installed|if(!not_installed:qtConfig(static)): load(qt_installs)
+installed|if(!not_installed:qtConfig(static)) {
+ !isEmpty(MODULE_EXT_HEADERS) {
+ headers.files = $${MODULE_EXT_HEADERS}
+ headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
+ INSTALLS += headers
+ } else {
+ !isEmpty(MODULE_EXT_HEADERS_DIR) {
+ headers.files = $$MODULE_EXT_HEADERS_DIR/*
+ headers.path = $$[QT_INSTALL_HEADERS]/$$TARGET
+ INSTALLS += headers
+ }
+ }
+
+ CONFIG += qt_install_module
+ rpl_header_base = $$MODULE_INCLUDEPATH
+ rpl_lib_base = $${MODULE_LIBS}
+ qqt_dir = \$\$\$\$[QT_INSTALL_HEADERS]
+ pri_header_replace.match = $$rpl_header_base
+ pri_header_replace.replace = $$qqt_dir/$$TARGET
+ pri_header_replace.CONFIG = path
+ pri_header_replace.filename = qt_ext_$${MODULE}.pri
+ qqt_dir = \$\$\$\$[QT_INSTALL_LIBS]
+ pri_lib_replace.match = $$rpl_lib_base
+ pri_lib_replace.replace = $$qqt_dir/$$prefix$${THE_TARGET}.$$suffix
+ pri_lib_replace.CONFIG = path
+ pri_lib_replace.filename = qt_ext_$${MODULE}.pri
+ QMAKE_INSTALL_REPLACE += pri_header_replace pri_lib_replace
+ load(qt_installs)
+}
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index 828a9621b9..3cacc8dfde 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -57,9 +57,9 @@ ucmodule = $$upper($$MODULE)
isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET
internal_module: \
- MODULE_DEPENDS = $$replace(QT, -private$, _private)
+ MODULE_DEPENDS += $$replace(QT, -private$, _private)
else: \
- MODULE_DEPENDS = $$replace(QT, -private$, )
+ MODULE_DEPENDS += $$replace(QT, -private$, )
MODULE_DEPENDS = $$unique(MODULE_DEPENDS)
contains(MODULE_DEPENDS, $$MODULE): \
error("$$TARGET depends on itself.")
@@ -117,8 +117,6 @@ unset(QT_FOR_PRIVATE)
QMAKE_USE_PRIVATE += $$QMAKE_USE_FOR_PRIVATE
unset(QMAKE_USE_FOR_PRIVATE)
-CONFIG += create_cmake
-
contains(TARGET, QtAddOn.*): \
DEFINES += QT_BUILD_ADDON_$${ucmodule}_LIB
else: \
@@ -128,7 +126,7 @@ else: \
lib_bundle {
# Set the CFBundleIdentifier prefix for Qt frameworks
QMAKE_TARGET_BUNDLE_PREFIX = org.qt-project
- #QMAKE_FRAMEWORK_VERSION = 4.0
+ QMAKE_FRAMEWORK_VERSION = "A" # Not based on Qt major version
CONFIG += sliced_bundle
header_module {
CONFIG += bundle
diff --git a/mkspecs/features/qt_module_pris.prf b/mkspecs/features/qt_module_pris.prf
index a8cc9835a5..1cf2afcac6 100644
--- a/mkspecs/features/qt_module_pris.prf
+++ b/mkspecs/features/qt_module_pris.prf
@@ -135,6 +135,7 @@ defineReplace(qtExportLibsForModule) {
"" \
"QT.$${MODULE_ID}.name = $$TARGET" \
"QT.$${MODULE_ID}.module = $$module_module" \
+ "QT.$${MODULE_ID}.ldflags = $$MODULE_LDFLAGS" \
"QT.$${MODULE_ID}.libs = $$module_libs" \
$$module_master \
"QT.$${MODULE_ID}.includes = $$MODULE_INCLUDES" \
@@ -154,6 +155,7 @@ defineReplace(qtExportLibsForModule) {
"QT_CONFIG +=$$join(QT.$${MODULE_ID}.QT_CONFIG, " ", " ")" \
"" \
"QT_MODULES += $$MODULE"
+ MODULE_PRI_CONT += $$MODULE_PRI_EXTRA_CONTENT
write_file($$MODULE_PRI, MODULE_PRI_CONT)|error()
!internal_module:!no_private_module {
module_build_type += internal_module
diff --git a/mkspecs/features/qt_plugin.prf b/mkspecs/features/qt_plugin.prf
index 78b210a00c..df798ae446 100644
--- a/mkspecs/features/qt_plugin.prf
+++ b/mkspecs/features/qt_plugin.prf
@@ -93,8 +93,6 @@ INSTALLS += target
TARGET = $$qt5LibraryTarget($$TARGET$$QT_LIBINFIX, "plugins/$$PLUGIN_TYPE/")
-CONFIG += create_cmake
-
DEFINES *= QT_DEPRECATED_WARNINGS
load(qt_targets)
diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf
index 1ef1dcfd1c..73a8a61a9c 100644
--- a/mkspecs/features/resolve_target.prf
+++ b/mkspecs/features/resolve_target.prf
@@ -56,9 +56,10 @@ win32 {
framework_ext = $$QMAKE_BUNDLE_EXTENSION
QMAKE_RESOLVED_BUNDLE = $${QMAKE_RESOLVED_TARGET}$${framework_target}$${framework_ext}
!shallow_bundle {
- TEMP_VERSION = $$section(VERSION, ., 0, 0)
- isEmpty(TEMP_VERSION):TEMP_VERSION = A
- QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${TEMP_VERSION}/$${TARGET}
+ framework_version = $$QMAKE_FRAMEWORK_VERSION
+ isEmpty(framework_version):framework_version = $$section(VERSION, ., 0, 0)
+ isEmpty(framework_version):framework_version = A
+ QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/Versions/$${framework_version}/$${TARGET}
} else {
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_BUNDLE}/$${TARGET}
}
diff --git a/mkspecs/features/resources_functions.prf b/mkspecs/features/resources_functions.prf
index 9b7c409121..7a260b471a 100644
--- a/mkspecs/features/resources_functions.prf
+++ b/mkspecs/features/resources_functions.prf
@@ -67,6 +67,12 @@ defineTest(qtFlattenResources) {
for (file, files) {
exists($$file/*): next() # exclude directories
alias = $$relative_path($$file, $$abs_base)
+
+ # If a resource is added by the build system from outside of $$_PRO_FILE_PWD_
+ # everything except the filename needs to be discarded.
+ subdir = $$find(alias, ^../)
+ if (!isEmpty(subdir)): alias = $$basename(file)
+
resource_file_content += \
"<file alias=\"$$xml_escape($$alias)\">$$xml_escape($$file)</file>"
OTHER_FILES *= $$file
diff --git a/mkspecs/features/toolchain.prf b/mkspecs/features/toolchain.prf
index e03c21dea2..2a1f7cba3d 100644
--- a/mkspecs/features/toolchain.prf
+++ b/mkspecs/features/toolchain.prf
@@ -182,6 +182,10 @@ isEmpty($${target_prefix}.INCDIRS) {
# UIKit simulator platforms will see the device SDK's sysroot in
# QMAKE_DEFAULT_*DIRS, because they're handled in a single build pass.
darwin {
+ # Clang doesn't pick up the architecture from the sysroot, and will
+ # default to the host architecture, so we need to manually set it.
+ cxx_flags += -arch $$QMAKE_APPLE_DEVICE_ARCHS
+
uikit:macx-xcode: \
cxx_flags += -isysroot $$sdk_path_device.value
else: \
@@ -322,9 +326,17 @@ isEmpty($${target_prefix}.INCDIRS) {
error("Mkspec does not specify MSVC_VER. Cannot continue.")
versionAtLeast(MSVC_VER, 15.0) {
dir = $$(VSINSTALLDIR)
- isEmpty(dir): \
- dir = $$read_registry(HKLM, \
- "Software\\Microsoft\\VisualStudio\\SxS\\VS7\\$$MSVC_VER", 32)
+ isEmpty(dir) {
+ version_parts = $$split(MSVC_VER, .)
+ MSVC_NEXT_MAJOR = $$num_add($$first(version_parts), 1)
+ vswhere = "$$getenv(ProgramFiles\(x86\))/Microsoft Visual Studio/Installer/vswhere.exe"
+ !exists($$vswhere): \
+ error("Could not find $$vswhere")
+ vswhere = $$system_quote($$system_path($$vswhere))
+ # -version parameter: A version range for instances to find. 15.0 will get all versions >= 15.0
+ # Example: [15.0,16.0) will find versions 15.*.
+ dir = $$system("$$vswhere -latest -version [$$MSVC_VER,$${MSVC_NEXT_MAJOR}.0] -property installationPath")
+ }
isEmpty(dir): \
error("Failed to find the Visual Studio installation directory.")
cmd += $$system_quote($$dir\\VC\\Auxiliary\\Build\\vcvarsall.bat) $$arch
diff --git a/mkspecs/features/uikit/default_pre.prf b/mkspecs/features/uikit/default_pre.prf
index ea6882fbc8..bc72936520 100644
--- a/mkspecs/features/uikit/default_pre.prf
+++ b/mkspecs/features/uikit/default_pre.prf
@@ -16,6 +16,8 @@ $$sim_and_dev {
DEFINES += QT_COMPILER_SUPPORTS_SSE2
}
+CONFIG += entrypoint
+
unset(sim_and_dev)
load(default_pre)
diff --git a/mkspecs/features/uikit/qt.prf b/mkspecs/features/uikit/qt.prf
deleted file mode 100644
index 4475c137dc..0000000000
--- a/mkspecs/features/uikit/qt.prf
+++ /dev/null
@@ -1,33 +0,0 @@
-
-qt_depends = $$resolve_depends(QT, "QT.")
-!watchos:equals(TEMPLATE, app):contains(qt_depends, gui(-private)?) {
- LIBS *= -L$$[QT_INSTALL_PLUGINS/get]/platforms
-
- lib_name = qios
- lib_path_and_base = $$[QT_INSTALL_PLUGINS/get]/platforms/lib$${lib_name}$$qtPlatformTargetSuffix()
- LIBS += -l$${lib_name}$$qtPlatformTargetSuffix() $$fromfile($${lib_path_and_base}.prl, QMAKE_PRL_LIBS)
-
- !bitcode {
- # By marking qt_registerPlatformPlugin as undefined, we ensure that
- # the plugin.o translation unit is considered for inclusion in
- # the final binary, which in turn ensures that the plugin's
- # static initializer is included and run.
- QMAKE_LFLAGS += -u _qt_registerPlatformPlugin
-
- # We do link and dependency resolution for the platform plugin
- # manually, since we know we always need the plugin, so we don't
- # need to generate an import for it.
- QTPLUGIN.platforms = -
- }
-
- !no_main_wrapper {
- # The LC_MAIN load command available in iOS 6.0 and above allows dyld to
- # directly call the entrypoint instead of going through _start in crt.o.
- # Passing -e to the linker changes the entrypoint from _main to our custom
- # wrapper that calls UIApplicationMain and dispatches back to main() once
- # the application has started up and is ready to initialize QApplication.
- QMAKE_LFLAGS += -Wl,-e,_qt_main_wrapper
- }
-}
-
-load(qt)
diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf
index 4bd1653aee..be8e20130f 100644
--- a/mkspecs/features/win32/default_pre.prf
+++ b/mkspecs/features/win32/default_pre.prf
@@ -1,2 +1,2 @@
-CONFIG = windows $$CONFIG
+CONFIG = windows $$CONFIG entrypoint
load(default_pre)
diff --git a/mkspecs/features/win32/idcidl.prf b/mkspecs/features/win32/idcidl.prf
index 922ae3f99e..67d3cf0cb0 100644
--- a/mkspecs/features/win32/idcidl.prf
+++ b/mkspecs/features/win32/idcidl.prf
@@ -3,8 +3,7 @@ build_pass:console {
warning("Remove 'console' from your CONFIG.")
}
-# Do not link qtmain.lib
-QMAKE_LIBS_QT_ENTRY =
+CONFIG -= entrypoint
ACTIVEQT_VERSION = $$VERSION
isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
index 272170d428..66ef21f2de 100644
--- a/mkspecs/features/win32/windows.prf
+++ b/mkspecs/features/win32/windows.prf
@@ -2,15 +2,4 @@ CONFIG -= console
QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
contains(TEMPLATE, ".*app") {
QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXE
- mingw:DEFINES += QT_NEEDS_QMAIN
-
- qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
- isEqual(entryLib, -lqtmain) {
- lib = $$QT.core.libs/$${QMAKE_PREFIX_STATICLIB}qtmain$$QT_LIBINFIX$$qtPlatformTargetSuffix().$$QMAKE_EXTENSION_STATICLIB
- PRE_TARGETDEPS += $$lib
- QMAKE_LIBS += $$lib
- } else {
- QMAKE_LIBS += $${entryLib}
- }
- }
}
diff --git a/mkspecs/win32-arm64-msvc2017/qmake.conf b/mkspecs/win32-arm64-msvc/qmake.conf
index ee10f9cc40..483bfa5e51 100644
--- a/mkspecs/win32-arm64-msvc2017/qmake.conf
+++ b/mkspecs/win32-arm64-msvc/qmake.conf
@@ -1,5 +1,5 @@
#
-# qmake configuration for win32-arm64-msvc2017
+# qmake configuration for win32-arm64-msvc
#
# Written for Microsoft C/C++ Optimizing Compiler targeting arm64.
#
diff --git a/mkspecs/win32-arm64-msvc2017/qplatformdefs.h b/mkspecs/win32-arm64-msvc/qplatformdefs.h
index 8a3afa7630..8a3afa7630 100644
--- a/mkspecs/win32-arm64-msvc2017/qplatformdefs.h
+++ b/mkspecs/win32-arm64-msvc/qplatformdefs.h