mirror of
https://github.com/aphrody-labs/vcpkg.git
synced 2026-10-13 21:53:07 +00:00
feat(aphrody): registre de ports aphrody (gtk depuis aphrody-labs/gtk@02b85fda tag 4.24.1, qtbase depuis aphrody-labs/qtbase@7a59d906 tag v6.11.2, patchs amont inchangés), triplets x64-windows-static-md, x64-linux et x64-linux-musl (Alpine) avec APHRODY_STORE non suivi ; base microsoft/vcpkg@0699a19d0c
This commit is contained in:
1 parent
0699a19d0c
commit
caa3dcce32
46 files changed
+2858
No files matched your search
@@ -0,0 +1,20 @@
|
||||
# aphrody vcpkg registry
|
||||
|
||||
Filesystem registry for ports built from aphrody-labs forks. Use it from a manifest:
|
||||
|
||||
```json
|
||||
{ "registries": [ { "kind": "filesystem", "path": "C:/vcpkg/aphrody/registry", "packages": ["gtk", "qtbase"] } ] }
|
||||
```
|
||||
|
||||
| Port | Source | State |
|
||||
| --- | --- | --- |
|
||||
| gtk 4.24.1 | aphrody-labs/gtk@02b85fda (tag 4.24.1), upstream vcpkg patches apply unchanged | ready |
|
||||
| qtbase 6.11.2 | aphrody-labs/qtbase@7a59d906 (tag v6.11.2), upstream vcpkg patches apply unchanged | ready |
|
||||
| webview2 1.0.4258.31 | builtin port (same nupkg sha512 as NuGet, one blob in the store) | builtin |
|
||||
| webkit, kirigami, kxmlgui (KF6) | no vcpkg port upstream, KF6 dependency chain missing | pending |
|
||||
| libcosmic | Rust crate, built with cargo, not vcpkg | out of scope |
|
||||
|
||||
Triplets: `x64-windows-static-md`, `x64-linux` (Ubuntu 26.04) and `x64-linux-musl` (Alpine, `VCPKG_FORCE_SYSTEM_BINARIES=1`)
|
||||
include `scripts/aphrody/triplet-common.cmake`, which passes `APHRODY_STORE` through untracked.
|
||||
With the aphrody-labs/vcpkg-tool build, `APHRODY_STORE` deduplicates downloads by sha512 in the store and puts the
|
||||
binary cache in `<store>/vcpkg/binary`.
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 713d87a531..e2e86726a2 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -1008,7 +1008,7 @@ if os_unix
|
||||
endif
|
||||
|
||||
|
||||
-if not meson.is_cross_build()
|
||||
+if false
|
||||
gnome.post_install(
|
||||
glib_compile_schemas: true,
|
||||
gtk_update_icon_cache: get_option('build-demos'),
|
||||
@@ -0,0 +1,109 @@
|
||||
# It installs only shared libs, regardless build type.
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
|
||||
# aphrody-labs/gtk fork, release tag ${VERSION}.
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/aphrody-labs/gtk/archive/02b85fda7f2078b601774bef3e5c0daddca12b2a.tar.gz"
|
||||
FILENAME "aphrody-labs-gtk-02b85fda7f2078b601774bef3e5c0daddca12b2a.tar.gz"
|
||||
SHA512 03f86778128d894124a5a5fb3cf7f1b621596f78ceeea5c0bd5ce8d7a7b6098492ef249ae1ebd258e24e6487dbfe4ec046c488554c36698aaef38949105e4190
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES
|
||||
0001-build.patch
|
||||
)
|
||||
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
get_filename_component(PKGCONFIG_DIR "${PKGCONFIG}" DIRECTORY )
|
||||
vcpkg_add_to_path("${PKGCONFIG_DIR}") # Post install script runs pkg-config so it needs to be on PATH
|
||||
vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/glib/")
|
||||
|
||||
set(x11 false)
|
||||
set(win32 false)
|
||||
set(osx false)
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
set(OPTIONS -Dwayland-backend=false) # CI missing at least wayland-protocols
|
||||
set(x11 true)
|
||||
# Enable the wayland gdk backend (only when building on Unix except for macOS)
|
||||
elseif(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(win32 true)
|
||||
elseif(VCPKG_TARGET_IS_OSX)
|
||||
set(osx true)
|
||||
endif()
|
||||
|
||||
list(APPEND OPTIONS -Dx11-backend=${x11}) #Enable the X11 gdk backend (only when building on Unix)
|
||||
list(APPEND OPTIONS -Dbroadway-backend=false) #Enable the broadway (HTML5) gdk backend
|
||||
list(APPEND OPTIONS -Dwin32-backend=${win32}) #Enable the Windows gdk backend (only when building on Windows)
|
||||
list(APPEND OPTIONS -Dmacos-backend=${osx}) #Enable the macOS gdk backend (only when building on macOS)
|
||||
|
||||
if("introspection" IN_LIST FEATURES)
|
||||
list(APPEND OPTIONS_RELEASE -Dintrospection=enabled)
|
||||
vcpkg_get_gobject_introspection_programs(PYTHON3 GIR_COMPILER GIR_SCANNER)
|
||||
else()
|
||||
list(APPEND OPTIONS_RELEASE -Dintrospection=disabled)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_meson(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS
|
||||
${OPTIONS}
|
||||
-Dbuild-demos=false
|
||||
-Dbuild-testsuite=false
|
||||
-Dbuild-examples=false
|
||||
-Dbuild-tests=false
|
||||
-Ddocumentation=false
|
||||
-Dman-pages=false
|
||||
-Dmedia-gstreamer=disabled # Build the gstreamer media backend
|
||||
-Dprint-cups=disabled # Build the cups print backend
|
||||
-Dvulkan=disabled # Enable support for the Vulkan graphics API
|
||||
-Dcloudproviders=disabled # Enable the cloudproviders support
|
||||
-Dsysprof=disabled # include tracing support for sysprof
|
||||
-Dtracker=disabled # Enable Tracker3 filechooser search
|
||||
-Dcolord=disabled # Build colord support for the CUPS printing backend
|
||||
-Df16c=disabled # Enable F16C fast paths (requires F16C)
|
||||
OPTIONS_RELEASE
|
||||
${OPTIONS_RELEASE}
|
||||
OPTIONS_DEBUG
|
||||
-Dintrospection=disabled
|
||||
ADDITIONAL_BINARIES
|
||||
glib-genmarshal='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-genmarshal'
|
||||
glib-mkenums='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-mkenums'
|
||||
glib-compile-resources='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-resources${VCPKG_HOST_EXECUTABLE_SUFFIX}'
|
||||
gdbus-codegen='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/gdbus-codegen'
|
||||
glib-compile-schemas='${CURRENT_HOST_INSTALLED_DIR}/tools/glib/glib-compile-schemas${VCPKG_HOST_EXECUTABLE_SUFFIX}'
|
||||
sassc='${CURRENT_HOST_INSTALLED_DIR}/tools/sassc/bin/sassc${VCPKG_HOST_EXECUTABLE_SUFFIX}'
|
||||
"g-ir-compiler='${GIR_COMPILER}'"
|
||||
"g-ir-scanner='${GIR_SCANNER}'"
|
||||
)
|
||||
|
||||
vcpkg_install_meson(ADD_BIN_TO_PATH)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
vcpkg_install_copyright(
|
||||
FILE_LIST
|
||||
"${SOURCE_PATH}/COPYING"
|
||||
"${SOURCE_PATH}/gdk/COPYING"
|
||||
"${SOURCE_PATH}/gtk/roaring/COPYING"
|
||||
"${SOURCE_PATH}/gtk/timsort/COPYING"
|
||||
)
|
||||
|
||||
set(TOOL_NAMES gtk4-builder-tool
|
||||
gtk4-path-tool
|
||||
gtk4-query-settings
|
||||
gtk4-rendernode-tool
|
||||
gtk4-update-icon-cache
|
||||
gtk4-image-tool)
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
list(APPEND TOOL_NAMES gtk4-launch)
|
||||
endif()
|
||||
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
@@ -0,0 +1,91 @@
|
||||
{
|
||||
"name": "gtk",
|
||||
"version": "4.24.1",
|
||||
"description": "Portable library for creating graphical user interfaces.",
|
||||
"homepage": "https://www.gtk.org",
|
||||
"license": "LGPL-2.1-or-later AND Apache-2.0",
|
||||
"supports": "!android & !xbox & !(arm64 & windows)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "cairo",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gobject"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "cairo",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"x11"
|
||||
],
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "directx-headers",
|
||||
"platform": "windows"
|
||||
},
|
||||
"gdk-pixbuf",
|
||||
{
|
||||
"name": "gettext",
|
||||
"host": true,
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"tools"
|
||||
]
|
||||
},
|
||||
"gettext-libintl",
|
||||
"glib",
|
||||
{
|
||||
"name": "glib",
|
||||
"host": true
|
||||
},
|
||||
"graphene",
|
||||
{
|
||||
"name": "harfbuzz",
|
||||
"features": [
|
||||
"glib"
|
||||
]
|
||||
},
|
||||
"libepoxy",
|
||||
"pango",
|
||||
{
|
||||
"name": "sassc",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-tool-meson",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"introspection": {
|
||||
"description": "Build with introspection",
|
||||
"supports": "!static & !windows",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "gdk-pixbuf",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"introspection"
|
||||
]
|
||||
},
|
||||
"gobject-introspection",
|
||||
{
|
||||
"name": "graphene",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"introspection"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pango",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"introspection"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
|
||||
index 24a194c..91c8e41 100644
|
||||
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
|
||||
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake
|
||||
@@ -95,6 +95,18 @@ find_library(GLIB2_GIO_LIBRARIES
|
||||
HINTS ${PC_GIO_LIBDIR}
|
||||
)
|
||||
|
||||
+pkg_check_modules(PC_GMODULE QUIET gmodule-2.0)
|
||||
+
|
||||
+find_path(GLIB2_GMODULE_INCLUDE_DIRS
|
||||
+ NAMES gmodule.h
|
||||
+ HINTS ${PC_GMODULE}
|
||||
+ PATH_SUFFIXES glib-2.0)
|
||||
+
|
||||
+find_library(GLIB2_GMODULE_LIBRARIES
|
||||
+ NAMES gmodule-2.0
|
||||
+ HINTS ${PC_GMODULE}
|
||||
+)
|
||||
+
|
||||
# search the glibconfig.h include dir under the same root where the library is found
|
||||
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
|
||||
|
||||
@@ -126,6 +138,11 @@ if(GLIB2_GIO_LIBRARIES AND GLIB2_GIO_INCLUDE_DIRS)
|
||||
set(GLIB2_GIO_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
+if(GLIB2_GMODULE_LIBRARIES AND GLIB2_GMODULE_INCLUDE_DIRS)
|
||||
+ set(GLIB2_GMODULE_FOUND TRUE)
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(GLIB2
|
||||
REQUIRED_VARS GLIB2_LIBRARIES GTHREAD2_LIBRARIES GLIB2_INCLUDE_DIRS
|
||||
@@ -137,6 +154,16 @@ if(GLIB2_FOUND AND NOT TARGET GLIB2::GLIB2)
|
||||
IMPORTED_LOCATION "${GLIB2_LIBRARIES}"
|
||||
INTERFACE_LINK_LIBRARIES "${GTHREAD2_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_INCLUDE_DIRS}")
|
||||
+ #vcpkg specific
|
||||
+ pkg_check_modules(PC_PCRE2_8BIT QUIET libpcre2-8)
|
||||
+ find_library(PCRE2_8BIT_LIBRARIES
|
||||
+ NAMES pcre2-8
|
||||
+ HINTS ${PC_PCRE2_8BIT}
|
||||
+ )
|
||||
+ target_link_libraries(GLIB2::GLIB2 INTERFACE ${PCRE2_8BIT_LIBRARIES})
|
||||
+ find_package(Iconv)
|
||||
+ find_package(Intl)
|
||||
+ target_link_libraries(GLIB2::GLIB2 INTERFACE Intl::Intl Iconv::Iconv)
|
||||
endif()
|
||||
|
||||
if(GLIB2_GOBJECT_FOUND AND NOT TARGET GLIB2::GOBJECT)
|
||||
@@ -153,12 +180,21 @@ if(GLIB2_GIO_FOUND AND NOT TARGET GLIB2::GIO)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GIO_INCLUDE_DIRS}")
|
||||
endif()
|
||||
|
||||
+if(GLIB2_GMODULE_FOUND AND NOT TARGET GLIB2::GMODULE)
|
||||
+ add_library(GLIB2::GMODULE UNKNOWN IMPORTED)
|
||||
+ set_target_properties(GLIB2::GMODULE PROPERTIES
|
||||
+ IMPORTED_LOCATION "${GLIB2_GMODULE_LIBRARIES}"
|
||||
+ INTERFACE_INCLUDE_DIRECTORIES "${GLIB2_GMODULE_INCLUDE_DIRS}")
|
||||
+endif()
|
||||
+
|
||||
+
|
||||
mark_as_advanced(GLIB2_INCLUDE_DIRS GLIB2_INCLUDE_DIR
|
||||
GLIB2_LIBRARIES GLIB2_LIBRARY
|
||||
GLIB2_GOBJECT_INCLUDE_DIRS GLIB2_GOBJECT_INCLUDE_DIR
|
||||
GLIB2_GOBJECT_LIBRARIES GLIB2_GOBJECT_LIBRARY
|
||||
GLIB2_GIO_INCLUDE_DIRS GLIB2_GIO_INCLUDE_DIR
|
||||
- GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY)
|
||||
+ GLIB2_GIO_LIBRARIES GLIB2_GIO_LIBRARY
|
||||
+ GLIB2_GMODULE_LIBRARIES GLIB2_GMODULE_INCLUDE_DIRS)
|
||||
|
||||
include(FeatureSummary)
|
||||
set_package_properties(GLIB2 PROPERTIES
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake
|
||||
index bd186c28b..2c1994d2e 100644
|
||||
--- a/cmake/QtBuildPathsHelpers.cmake
|
||||
+++ b/cmake/QtBuildPathsHelpers.cmake
|
||||
@@ -141,11 +141,9 @@ function(qt_configure_process_path name default docstring)
|
||||
elseif(rel_path MATCHES "^\.\./")
|
||||
# INSTALL_SYSCONFDIR is allowed to be outside the prefix.
|
||||
if(NOT name STREQUAL "INSTALL_SYSCONFDIR")
|
||||
- message(FATAL_ERROR
|
||||
- "Path component '${name}' is outside computed install prefix: ${rel_path} ")
|
||||
endif()
|
||||
# Keep the absolute path.
|
||||
set(new_value "${${name}}")
|
||||
else()
|
||||
# Use the canonicalized path.
|
||||
set(new_value "${rel_path}")
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
|
||||
index e40cd85..ba68a01 100644
|
||||
--- a/src/corelib/kernel/qmetatype.h
|
||||
+++ b/src/corelib/kernel/qmetatype.h
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <QtCore/qscopeguard.h>
|
||||
#include <QtCore/qttypetraits.h>
|
||||
|
||||
+#include <type_traits>
|
||||
#include <array>
|
||||
#include <new>
|
||||
#include <vector>
|
||||
@@ -826,7 +829,13 @@
|
||||
struct IsGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; };
|
||||
|
||||
template<typename T>
|
||||
+#if defined(__clang__) && (__clang_major__ > 11)
|
||||
+ // Clang does not reject T::QtGadgetHelper as ambiguous if a class inherits from two QGADGETS
|
||||
+ // but is not a QGADGET itself
|
||||
+ struct IsGadgetHelper<T, std::void_t<typename T::QtGadgetHelper, decltype(&T::qt_check_for_QGADGET_macro)>>
|
||||
+#else
|
||||
struct IsGadgetHelper<T, typename T::QtGadgetHelper>
|
||||
+#endif
|
||||
{
|
||||
template <typename X>
|
||||
static char checkType(void (X::*)());
|
||||
@@ -841,7 +850,11 @@
|
||||
struct IsPointerToGadgetHelper { enum { IsRealGadget = false, IsGadgetOrDerivedFrom = false }; };
|
||||
|
||||
template<typename T>
|
||||
+#if defined(__clang__) && (__clang_major__ > 11)
|
||||
+ struct IsPointerToGadgetHelper<T*, std::void_t<typename T::QtGadgetHelper, decltype(&T::qt_check_for_QGADGET_macro)>>
|
||||
+#else
|
||||
struct IsPointerToGadgetHelper<T*, typename T::QtGadgetHelper>
|
||||
+#endif
|
||||
{
|
||||
using BaseType = T;
|
||||
template <typename X>
|
||||
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
|
||||
index 823b2057b..4a8cd4fa8 100644
|
||||
--- a/src/corelib/kernel/qproperty.h
|
||||
+++ b/src/corelib/kernel/qproperty.h
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
#include <QtCore/qpropertyprivate.h>
|
||||
|
||||
-#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_QDOC)
|
||||
+#if __has_include(<source_location>) && __cplusplus >= 202002L && !defined(Q_QDOC) && ( (defined(__cpp_consteval) && defined(_MSC_VER)) || !defined(_MSC_VER) )
|
||||
#include <source_location>
|
||||
#if defined(__cpp_lib_source_location)
|
||||
#define QT_SOURCE_LOCATION_NAMESPACE std
|
||||
#define QT_PROPERTY_COLLECT_BINDING_LOCATION
|
||||
@@ -0,0 +1,27 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
#Could probably be the beginning of a vcpkg_install_copyright?
|
||||
function(qt_install_copyright SOURCE_PATH)
|
||||
#Find the relevant license file and install it
|
||||
if(EXISTS "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.LGPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPLv3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.GPL3-EXCEPT")
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSE.FDL")
|
||||
set(LICENSE_PATH "${SOURCE_PATH}/LICENSE.FDL")
|
||||
endif()
|
||||
if(LICENSE_PATH)
|
||||
file(INSTALL "${LICENSE_PATH}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
elseif(EXISTS "${SOURCE_PATH}/LICENSES")
|
||||
file(GLOB LICENSES "${SOURCE_PATH}/LICENSES/*")
|
||||
vcpkg_install_copyright(FILE_LIST ${LICENSES})
|
||||
else()
|
||||
message(WARNING "No license/copyright file found!")
|
||||
endif()
|
||||
endfunction()
|
||||
@@ -0,0 +1,386 @@
|
||||
include_guard(GLOBAL)
|
||||
|
||||
include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake/vcpkg-port-config.cmake")
|
||||
include("${CURRENT_HOST_INSTALLED_DIR}/share/vcpkg-cmake-config/vcpkg-port-config.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/qt_install_copyright.cmake")
|
||||
|
||||
if(NOT DEFINED QT6_DIRECTORY_PREFIX)
|
||||
set(QT6_DIRECTORY_PREFIX "Qt6/")
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_ANDROID)
|
||||
# ANDROID_HOME: canonical SDK environment variable
|
||||
# ANDROID_SDK_ROOT: legacy qtbase triplet variable
|
||||
if(NOT ANDROID_SDK_ROOT)
|
||||
if("$ENV{ANDROID_HOME}" STREQUAL "")
|
||||
message(FATAL_ERROR "${PORT} requires environment variable ANDROID_HOME to be set.")
|
||||
endif()
|
||||
set(ANDROID_SDK_ROOT "$ENV{ANDROID_HOME}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
function(qt_download_submodule_impl)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" "SUBMODULE" "PATCHES")
|
||||
|
||||
if("${_qarg_SUBMODULE}" IN_LIST QT_FROM_QT_GIT)
|
||||
# qtinterfaceframework is not available in the release, so we fall back to a `git clone`.
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
URL "${${_qarg_SUBMODULE}_URL}"
|
||||
REF "${${_qarg_SUBMODULE}_REF}"
|
||||
PATCHES ${_qarg_PATCHES}
|
||||
)
|
||||
if(PORT STREQUAL "qttools") # Keep this for beta & rc's
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH_QLITEHTML
|
||||
URL https://code.qt.io/playground/qlitehtml.git
|
||||
REF "${${PORT}_qlitehtml_REF}"
|
||||
FETCH_REF master
|
||||
HEAD_REF master
|
||||
)
|
||||
# port 'litehtml' is not in vcpkg!
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH_LITEHTML
|
||||
REPO litehtml/litehtml
|
||||
REF "${${PORT}_litehtml_REF}"
|
||||
SHA512 "${${PORT}_litehtml_HASH}"
|
||||
HEAD_REF master
|
||||
)
|
||||
file(COPY "${SOURCE_PATH_QLITEHTML}/" DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml")
|
||||
file(COPY "${SOURCE_PATH_LITEHTML}/" DESTINATION "${SOURCE_PATH}/src/assistant/qlitehtml/src/3rdparty/litehtml")
|
||||
elseif(PORT STREQUAL "qtwebengine")
|
||||
vcpkg_from_git(
|
||||
OUT_SOURCE_PATH SOURCE_PATH_WEBENGINE
|
||||
URL https://code.qt.io/qt/qtwebengine-chromium.git
|
||||
REF "${${PORT}_chromium_REF}"
|
||||
)
|
||||
if(NOT EXISTS "${SOURCE_PATH}/src/3rdparty/chromium")
|
||||
file(RENAME "${SOURCE_PATH_WEBENGINE}/chromium" "${SOURCE_PATH}/src/3rdparty/chromium")
|
||||
endif()
|
||||
if(NOT EXISTS "${SOURCE_PATH}/src/3rdparty/gn")
|
||||
file(RENAME "${SOURCE_PATH_WEBENGINE}/gn" "${SOURCE_PATH}/src/3rdparty/gn")
|
||||
endif()
|
||||
endif()
|
||||
else()
|
||||
if(VCPKG_USE_HEAD_VERSION)
|
||||
set(sha512 SKIP_SHA512)
|
||||
elseif(NOT DEFINED "${_qarg_SUBMODULE}_HASH")
|
||||
message(FATAL_ERROR "No information for ${_qarg_SUBMODULE} -- add it to QT_PORTS and run qtbase in QT_UPDATE_VERSION mode first")
|
||||
else()
|
||||
set(sha512 SHA512 "${${_qarg_SUBMODULE}_HASH}")
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(archive
|
||||
URLS ${${_qarg_SUBMODULE}_URL}
|
||||
FILENAME ${${_qarg_SUBMODULE}_FILENAME}
|
||||
${sha512}
|
||||
)
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${archive}"
|
||||
PATCHES ${_qarg_PATCHES}
|
||||
)
|
||||
endif()
|
||||
set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
function(qt_download_submodule)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "" "" "PATCHES")
|
||||
|
||||
qt_download_submodule_impl(SUBMODULE "${PORT}" PATCHES ${_qarg_PATCHES})
|
||||
|
||||
set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
|
||||
function(qt_cmake_configure)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "_qarg" "DISABLE_NINJA;DISABLE_PARALLEL_CONFIGURE"
|
||||
""
|
||||
"TOOL_NAMES;OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE;OPTIONS_MAYBE_UNUSED")
|
||||
|
||||
vcpkg_find_acquire_program(PERL) # Perl is probably required by all qt ports for syncqt
|
||||
get_filename_component(PERL_PATH ${PERL} DIRECTORY)
|
||||
vcpkg_add_to_path(${PERL_PATH})
|
||||
if(NOT PORT STREQUAL "qtwebengine" OR QT_IS_LATEST) # qtwebengine requires python2; since 6.3 python3
|
||||
vcpkg_find_acquire_program(PYTHON3) # Python is required by some qt ports
|
||||
get_filename_component(PYTHON3_PATH ${PYTHON3} DIRECTORY)
|
||||
vcpkg_add_to_path(${PYTHON3_PATH})
|
||||
endif()
|
||||
|
||||
if(NOT PORT MATCHES "^qtbase")
|
||||
list(APPEND _qarg_OPTIONS "-DQT_SYNCQT:PATH=${CURRENT_HOST_INSTALLED_DIR}/tools/Qt6/bin/syncqt.pl")
|
||||
endif()
|
||||
set(PERL_OPTION "-DHOST_PERL:PATH=${PERL}")
|
||||
|
||||
set(ninja_option "")
|
||||
if(_qarg_DISABLE_NINJA)
|
||||
set(ninja_option WINDOWS_USE_MSBUILD)
|
||||
endif()
|
||||
|
||||
set(disable_parallel "")
|
||||
if(_qarg_DISABLE_PARALLEL_CONFIGURE)
|
||||
set(disable_parallel DISABLE_PARALLEL_CONFIGURE)
|
||||
endif()
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
list(APPEND _qarg_OPTIONS "-DQT_HOST_PATH=${CURRENT_HOST_INSTALLED_DIR}")
|
||||
list(APPEND _qarg_OPTIONS "-DQT_HOST_PATH_CMAKE_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share")
|
||||
endif()
|
||||
|
||||
# Disable warning for CMAKE_(REQUIRE|DISABLE)_FIND_PACKAGE_<packagename>
|
||||
string(REGEX MATCHALL "CMAKE_DISABLE_FIND_PACKAGE_[^:=]+" disabled_find_package "${_qarg_OPTIONS}")
|
||||
list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_find_package})
|
||||
|
||||
string(REGEX MATCHALL "CMAKE_REQUIRE_FIND_PACKAGE_[^:=]+(:BOOL)?=OFF" require_find_package "${_qarg_OPTIONS}")
|
||||
list(TRANSFORM require_find_package REPLACE "(:BOOL)?=OFF" "")
|
||||
list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${require_find_package})
|
||||
|
||||
# Disable unused warnings for disabled features. Qt might decide to not emit the feature variables if other features are deactivated.
|
||||
string(REGEX MATCHALL "(QT_)?FEATURE_[^:=]+(:BOOL)?=OFF" disabled_features "${_qarg_OPTIONS}")
|
||||
list(TRANSFORM disabled_features REPLACE "(:BOOL)?=OFF" "")
|
||||
list(APPEND _qarg_OPTIONS_MAYBE_UNUSED ${disabled_features})
|
||||
|
||||
list(APPEND _qarg_OPTIONS "-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON")
|
||||
|
||||
if(VCPKG_TARGET_IS_ANDROID)
|
||||
list(APPEND _qarg_OPTIONS "-DANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT PORT MATCHES "qtbase")
|
||||
list(APPEND _qarg_OPTIONS "-DQT_MKSPECS_DIR:PATH=${CURRENT_HOST_INSTALLED_DIR}/share/Qt6/mkspecs")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED VCPKG_OSX_DEPLOYMENT_TARGET)
|
||||
list(APPEND _qarg_OPTIONS "-DCMAKE_OSX_DEPLOYMENT_TARGET=14")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
${ninja_option}
|
||||
${disable_parallel}
|
||||
OPTIONS
|
||||
-DQT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK=ON
|
||||
-DQT_NO_FORCE_SET_CMAKE_BUILD_TYPE:BOOL=ON
|
||||
-DQT_USE_DEFAULT_CMAKE_OPTIMIZATION_FLAGS:BOOL=ON # We don't want Qt to mess with users toolchain settings.
|
||||
-DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Because Qt doesn't correctly scope find_package calls.
|
||||
#-DQT_HOST_PATH=<somepath> # For crosscompiling
|
||||
#-DQT_PLATFORM_DEFINITION_DIR=mkspecs/win32-msvc
|
||||
#-DQT_QMAKE_TARGET_MKSPEC=win32-msvc
|
||||
#-DQT_USE_CCACHE
|
||||
-DQT_BUILD_EXAMPLES:BOOL=OFF
|
||||
-DQT_BUILD_TESTS:BOOL=OFF
|
||||
-DQT_BUILD_BENCHMARKS:BOOL=OFF
|
||||
${PERL_OPTION}
|
||||
-DINSTALL_BINDIR:STRING=bin
|
||||
-DINSTALL_LIBEXECDIR:STRING=bin
|
||||
-DINSTALL_PLUGINSDIR:STRING=${qt_plugindir}
|
||||
-DINSTALL_QMLDIR:STRING=${qt_qmldir}
|
||||
${_qarg_OPTIONS}
|
||||
"-DQT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX:STRING=${CURRENT_INSTALLED_DIR}"
|
||||
OPTIONS_RELEASE
|
||||
${_qarg_OPTIONS_RELEASE}
|
||||
-DINSTALL_DOCDIR:STRING=doc/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_INCLUDEDIR:STRING=include/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_DESCRIPTIONSDIR:STRING=share/Qt6/modules
|
||||
-DINSTALL_MKSPECSDIR:STRING=share/Qt6/mkspecs
|
||||
-DINSTALL_TRANSLATIONSDIR:STRING=translations/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_CMAKEDIR:STRING=share
|
||||
OPTIONS_DEBUG
|
||||
# -DFEATURE_debug:BOOL=ON only needed by qtbase and auto detected?
|
||||
-DINSTALL_DOCDIR:STRING=../doc/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_INCLUDEDIR:STRING=../include/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_TRANSLATIONSDIR:STRING=../translations/${QT6_DIRECTORY_PREFIX}
|
||||
-DINSTALL_DESCRIPTIONSDIR:STRING=../share/Qt6/modules
|
||||
-DINSTALL_MKSPECSDIR:STRING=../share/Qt6/mkspecs
|
||||
-DINSTALL_CMAKEDIR:STRING=share
|
||||
${_qarg_OPTIONS_DEBUG}
|
||||
MAYBE_UNUSED_VARIABLES
|
||||
INSTALL_BINDIR
|
||||
INSTALL_DOCDIR
|
||||
INSTALL_LIBEXECDIR
|
||||
INSTALL_QMLDIR # No qml files
|
||||
INSTALL_TRANSLATIONSDIR # No translations
|
||||
INSTALL_PLUGINSDIR # No plugins
|
||||
INSTALL_DESCRIPTIONSDIR
|
||||
INSTALL_INCLUDEDIR
|
||||
HOST_PERL
|
||||
QT_SYNCQT
|
||||
QT_NO_FORCE_SET_CMAKE_BUILD_TYPE
|
||||
QT_FORCE_WARN_APPLE_SDK_AND_XCODE_CHECK
|
||||
QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX
|
||||
${_qarg_OPTIONS_MAYBE_UNUSED}
|
||||
INPUT_bundled_xcb_xinput
|
||||
INPUT_freetype
|
||||
INPUT_harfbuzz
|
||||
INPUT_libjpeg
|
||||
INPUT_libmd4c
|
||||
INPUT_libpng
|
||||
INPUT_opengl
|
||||
INPUT_openssl
|
||||
INPUT_xcb
|
||||
INPUT_xkbcommon
|
||||
)
|
||||
foreach(suffix IN ITEMS dbg rel)
|
||||
if(EXISTS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${suffix}/config.summary")
|
||||
file(COPY_FILE
|
||||
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${suffix}/config.summary"
|
||||
"${CURRENT_BUILDTREES_DIR}/config.summary-${TARGET_TRIPLET}-${suffix}.log"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(qt_fix_prl_files)
|
||||
file(TO_CMAKE_PATH "${CURRENT_PACKAGES_DIR}/lib" package_dir)
|
||||
file(TO_CMAKE_PATH "${package_dir}/lib" lib_path)
|
||||
file(TO_CMAKE_PATH "${package_dir}/include/Qt6" include_path)
|
||||
file(TO_CMAKE_PATH "${CURRENT_INSTALLED_DIR}" install_prefix)
|
||||
file(GLOB_RECURSE prl_files "${CURRENT_PACKAGES_DIR}/*.prl" "${CURRENT_PACKAGES_DIR}/*.pri")
|
||||
foreach(prl_file IN LISTS prl_files)
|
||||
file(READ "${prl_file}" _contents)
|
||||
string(REPLACE "${lib_path}" "\$\$[QT_INSTALL_LIBS]" _contents "${_contents}")
|
||||
string(REPLACE "${include_path}" "\$\$[QT_INSTALL_HEADERS]" _contents "${_contents}")
|
||||
string(REPLACE "${install_prefix}" "\$\$[QT_INSTALL_PREFIX]" _contents "${_contents}")
|
||||
string(REPLACE "[QT_INSTALL_PREFIX]/lib/objects-Debug" "[QT_INSTALL_LIBS]/objects-Debug" _contents "${_contents}")
|
||||
string(REPLACE "[QT_INSTALL_PREFIX]/Qt6/qml" "[QT_INSTALL_QML]" _contents "${_contents}")
|
||||
#Note: This only works without an extra if case since QT_INSTALL_PREFIX is the same for debug and release
|
||||
file(WRITE "${prl_file}" "${_contents}")
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(qt_fixup_and_cleanup)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "_qarg" ""
|
||||
""
|
||||
"TOOL_NAMES")
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
## Handle PRL files
|
||||
qt_fix_prl_files()
|
||||
|
||||
## Handle CMake files.
|
||||
set(COMPONENTS)
|
||||
file(GLOB COMPONENTS_OR_FILES LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/share/Qt6*")
|
||||
list(REMOVE_ITEM COMPONENTS_OR_FILES "${CURRENT_PACKAGES_DIR}/share/Qt6")
|
||||
foreach(_glob IN LISTS COMPONENTS_OR_FILES)
|
||||
if(IS_DIRECTORY "${_glob}")
|
||||
string(REPLACE "${CURRENT_PACKAGES_DIR}/share/Qt6" "" _component "${_glob}")
|
||||
debug_message("Adding cmake component: '${_component}'")
|
||||
list(APPEND COMPONENTS ${_component})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(_comp IN LISTS COMPONENTS)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6${_comp}")
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME "Qt6${_comp}" CONFIG_PATH "share/Qt6${_comp}" TOOLS_PATH "tools/Qt6/bin")
|
||||
else()
|
||||
message(STATUS "WARNING: Qt component ${_comp} not found/built!")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
#fix debug plugin paths (should probably be fixed in vcpkg_cmake_config_fixup)
|
||||
file(GLOB_RECURSE DEBUG_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/**/*Targets-debug.cmake")
|
||||
debug_message("DEBUG_CMAKE_TARGETS:${DEBUG_CMAKE_TARGETS}")
|
||||
foreach(_debug_target IN LISTS DEBUG_CMAKE_TARGETS)
|
||||
vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_plugindir}" "{_IMPORT_PREFIX}/debug/${qt_plugindir}" IGNORE_UNCHANGED)
|
||||
vcpkg_replace_string("${_debug_target}" "{_IMPORT_PREFIX}/${qt_qmldir}" "{_IMPORT_PREFIX}/debug/${qt_qmldir}" IGNORE_UNCHANGED)
|
||||
endforeach()
|
||||
|
||||
file(GLOB_RECURSE STATIC_CMAKE_TARGETS "${CURRENT_PACKAGES_DIR}/share/Qt6Qml/QmlPlugins/*.cmake")
|
||||
foreach(_plugin_target IN LISTS STATIC_CMAKE_TARGETS)
|
||||
# restore a single get_filename_component which was remove by vcpkg_cmake_config_fixup
|
||||
vcpkg_replace_string("${_plugin_target}"
|
||||
[[get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH)]]
|
||||
"get_filename_component(_IMPORT_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)\nget_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)"
|
||||
IGNORE_UNCHANGED)
|
||||
endforeach()
|
||||
|
||||
set(qt_tooldest "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
set(qt_searchdir "${CURRENT_PACKAGES_DIR}/bin")
|
||||
## Handle Tools
|
||||
foreach(_tool IN LISTS _qarg_TOOL_NAMES)
|
||||
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
||||
debug_message("Removed '${_tool}' from copy tools list since it was not found!")
|
||||
list(REMOVE_ITEM _qarg_TOOL_NAMES ${_tool})
|
||||
endif()
|
||||
endforeach()
|
||||
if(_qarg_TOOL_NAMES)
|
||||
set(tool_names ${_qarg_TOOL_NAMES})
|
||||
vcpkg_copy_tools(TOOL_NAMES ${tool_names} SEARCH_DIR "${qt_searchdir}" DESTINATION "${qt_tooldest}" AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/")
|
||||
file(COPY "${CURRENT_PACKAGES_DIR}/bin/" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
endif()
|
||||
file(GLOB_RECURSE _installed_dll_files RELATIVE "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin" "${CURRENT_INSTALLED_DIR}/tools/Qt6/bin/*.dll")
|
||||
foreach(_dll_to_remove IN LISTS _installed_dll_files)
|
||||
file(GLOB_RECURSE _packaged_dll_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${_dll_to_remove}")
|
||||
if(EXISTS "${_packaged_dll_file}")
|
||||
file(REMOVE "${_packaged_dll_file}")
|
||||
endif()
|
||||
endforeach()
|
||||
file(GLOB_RECURSE _folders LIST_DIRECTORIES true "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/")
|
||||
file(GLOB_RECURSE _files "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/**/")
|
||||
if(_files)
|
||||
list(REMOVE_ITEM _folders ${_files})
|
||||
endif()
|
||||
foreach(_dir IN LISTS _folders)
|
||||
if(NOT "${_remaining_dll_files}" MATCHES "${_dir}")
|
||||
file(REMOVE_RECURSE "${_dir}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
file(REMOVE_RECURSE
|
||||
"${CURRENT_PACKAGES_DIR}/debug/share"
|
||||
"${CURRENT_PACKAGES_DIR}/debug/include"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*")
|
||||
if(NOT _bin_files STREQUAL "")
|
||||
message(STATUS "Remaining files in bin: '${_bin_files}'")
|
||||
else() # Only clean if empty otherwise let vcpkg throw and error.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
endfunction()
|
||||
|
||||
function(qt_install_submodule)
|
||||
cmake_parse_arguments(PARSE_ARGV 0 "_qis" "DISABLE_NINJA"
|
||||
""
|
||||
"PATCHES;TOOL_NAMES;CONFIGURE_OPTIONS;CONFIGURE_OPTIONS_DEBUG;CONFIGURE_OPTIONS_RELEASE;CONFIGURE_OPTIONS_MAYBE_UNUSED")
|
||||
|
||||
set(qt_plugindir ${QT6_DIRECTORY_PREFIX}plugins)
|
||||
set(qt_qmldir ${QT6_DIRECTORY_PREFIX}qml)
|
||||
|
||||
qt_download_submodule(PATCHES ${_qis_PATCHES})
|
||||
|
||||
if(VCPKG_TARGET_IS_ANDROID)
|
||||
# Qt only supports dynamic linkage on Android,
|
||||
# https://bugreports.qt.io/browse/QTBUG-32618.
|
||||
# It requires libc++_shared, cf. <qtbase>/cmake/QtPlatformAndroid.cmake
|
||||
# and https://developer.android.com/ndk/guides/cpp-support#sr
|
||||
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
||||
endif()
|
||||
|
||||
if(_qis_DISABLE_NINJA)
|
||||
set(_opt DISABLE_NINJA)
|
||||
endif()
|
||||
qt_cmake_configure(${_opt}
|
||||
OPTIONS ${_qis_CONFIGURE_OPTIONS}
|
||||
OPTIONS_DEBUG ${_qis_CONFIGURE_OPTIONS_DEBUG}
|
||||
OPTIONS_RELEASE ${_qis_CONFIGURE_OPTIONS_RELEASE}
|
||||
OPTIONS_MAYBE_UNUSED ${_qis_CONFIGURE_OPTIONS_MAYBE_UNUSED}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
||||
|
||||
qt_fixup_and_cleanup(TOOL_NAMES ${_qis_TOOL_NAMES})
|
||||
|
||||
qt_install_copyright("${SOURCE_PATH}")
|
||||
set(SOURCE_PATH "${SOURCE_PATH}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/qt_port_details.cmake")
|
||||
@@ -0,0 +1,188 @@
|
||||
### Steps to update the qt6 ports
|
||||
## 1. Change QT_VERSION below to the new version
|
||||
## 2. Set QT_UPDATE_VERSION to 1
|
||||
## 3. Add any new Qt modules to QT_PORTS
|
||||
## 4. Run a build of `qtbase`
|
||||
## 5. Fix any intermediate failures by adding the module into QT_FROM_GITHUB, QT_FROM_GITHUB_BRANCH, or QT_FROM_QT_GIT as appropriate
|
||||
## 6. The build should fail with "Done downloading version and emitting hashes." This will have changed out the vcpkg.json versions of the qt ports and rewritten qt_port_data.cmake
|
||||
## 7. Set QT_UPDATE_VERSION back to 0
|
||||
|
||||
set(QT_VERSION 6.11.2)
|
||||
|
||||
set(QT_DEV_BRANCH 0)
|
||||
|
||||
set(QT_UPDATE_VERSION 0)
|
||||
|
||||
### Setting up the git tag.
|
||||
|
||||
set(QT_PORTS qt
|
||||
qtbase
|
||||
qttools
|
||||
qtdeclarative
|
||||
qtsvg
|
||||
qt5compat
|
||||
qtshadertools
|
||||
qtquicktimeline
|
||||
qtquick3d
|
||||
qttranslations
|
||||
qtwayland
|
||||
qtdoc
|
||||
qtcoap
|
||||
qtopcua
|
||||
qtimageformats
|
||||
qtmqtt
|
||||
qtnetworkauth
|
||||
qt3d)
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.1)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.1
|
||||
qtactiveqt
|
||||
qtdatavis3d
|
||||
qtdeviceutilities
|
||||
qtlottie
|
||||
qtscxml
|
||||
qtvirtualkeyboard
|
||||
qtcharts)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.2)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.2
|
||||
qtconnectivity
|
||||
qtpositioning
|
||||
qtlocation # back in 6.5 as tech preview
|
||||
qtmultimedia
|
||||
qtremoteobjects
|
||||
qtsensors
|
||||
qtserialbus
|
||||
qtserialport
|
||||
qtwebchannel
|
||||
qtwebengine
|
||||
qtwebsockets
|
||||
qtwebview)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.2.2)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.2.2
|
||||
qtinterfaceframework
|
||||
qtapplicationmanager)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.3.0)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.3.0
|
||||
qtlanguageserver)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.4.0)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.4.0
|
||||
qthttpserver
|
||||
qtquick3dphysics
|
||||
qtspeech)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.5.0)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.5.0
|
||||
qtgrpc
|
||||
qtquickeffectmaker
|
||||
)
|
||||
endif()
|
||||
if(QT_VERSION VERSION_GREATER_EQUAL 6.6.0)
|
||||
list(APPEND QT_PORTS
|
||||
## New in 6.6.0
|
||||
qtgraphs
|
||||
#qtvncserver # only commercial
|
||||
#qtinsighttracker
|
||||
)
|
||||
endif()
|
||||
#qtinsighttracker
|
||||
#qtvncserver
|
||||
#qtgraphs
|
||||
|
||||
# 1. By default, modules come from the official release
|
||||
# 2. These modules are mirrored to github and have tags matching the release
|
||||
set(QT_FROM_GITHUB qtcoap qtopcua qtmqtt qtapplicationmanager qtinterfaceframework)
|
||||
# 3. These modules are mirrored to github and have branches matching the release
|
||||
set(QT_FROM_GITHUB_BRANCH qtdeviceutilities)
|
||||
# 4. These modules are not mirrored to github and not part of the release
|
||||
set(QT_FROM_QT_GIT "")
|
||||
# For beta releases uncomment the next two lines and comment the lines with QT_FROM_GITHUB, QT_FROM_GITHUB_BRANCH, QT_FROM_QT_GIT
|
||||
#set(QT_FROM_QT_GIT ${QT_PORTS})
|
||||
#list(POP_FRONT QT_FROM_QT_GIT)
|
||||
|
||||
function(qt_get_url_filename qt_port out_urls out_filename)
|
||||
if("${qt_port}" IN_LIST QT_FROM_GITHUB)
|
||||
set(urls "https://github.com/qt/${qt_port}/archive/v${QT_VERSION}.tar.gz")
|
||||
set(filename "qt-${qt_port}-v${QT_VERSION}.tar.gz")
|
||||
elseif("${qt_port}" IN_LIST QT_FROM_GITHUB_BRANCH)
|
||||
set(urls "https://github.com/qt/${qt_port}/archive/${QT_VERSION}.tar.gz")
|
||||
set(filename "qt-${qt_port}-${QT_VERSION}.tar.gz")
|
||||
else()
|
||||
string(SUBSTRING "${QT_VERSION}" 0 4 qt_major_minor)
|
||||
|
||||
if(NOT QT_DEV_BRANCH)
|
||||
set(branch_subpath "archive")
|
||||
else()
|
||||
set(branch_subpath "development_releases")
|
||||
endif()
|
||||
|
||||
set(filename "${qt_port}-everywhere-src-${QT_VERSION}.tar.xz")
|
||||
set(mirrors
|
||||
"https://download.qt.io/"
|
||||
"https://mirrors.ocf.berkeley.edu/qt/"
|
||||
)
|
||||
set(url_subpath "${branch_subpath}/qt/${qt_major_minor}/${QT_VERSION}/submodules/${filename}")
|
||||
list(TRANSFORM mirrors APPEND "${url_subpath}" OUTPUT_VARIABLE urls)
|
||||
endif()
|
||||
set(${out_urls} ${urls} PARENT_SCOPE)
|
||||
set(${out_filename} "${filename}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(QT_UPDATE_VERSION)
|
||||
if(NOT PORT STREQUAL "qtbase")
|
||||
message(FATAL_ERROR "QT_UPDATE_VERSION must be used from the root 'qtbase' package")
|
||||
endif()
|
||||
set(VCPKG_USE_HEAD_VERSION 1)
|
||||
set(msg "" CACHE INTERNAL "")
|
||||
foreach(qt_port IN LISTS QT_PORTS)
|
||||
set(port_json "${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/vcpkg.json")
|
||||
file(READ "${port_json}" _control_contents)
|
||||
string(REGEX REPLACE "\"version(-(string|semver))?\": [^\n]+\n" "\"version\": \"${QT_VERSION}\",\n" _control_contents "${_control_contents}")
|
||||
string(REGEX REPLACE "\"port-version\": [^\n]+\n" "" _control_contents "${_control_contents}")
|
||||
file(WRITE "${port_json}" "${_control_contents}")
|
||||
configure_file("${port_json}" "${port_json}" @ONLY NEWLINE_STYLE LF)
|
||||
|
||||
set(port_data "")
|
||||
if(qt_port STREQUAL "qt")
|
||||
continue()
|
||||
endif()
|
||||
if("${qt_port}" IN_LIST QT_FROM_QT_GIT)
|
||||
vcpkg_find_acquire_program(GIT)
|
||||
execute_process(
|
||||
COMMAND "${GIT}" ls-remote -t "https://code.qt.io/cgit/qt/${qt_port}.git" "v${QT_VERSION}"
|
||||
OUTPUT_VARIABLE out
|
||||
)
|
||||
string(SUBSTRING "${out}" 0 40 tag_sha)
|
||||
string(APPEND msg "set(${qt_port}_REF ${tag_sha})\n")
|
||||
string(APPEND port_data "set(${qt_port}_REF ${tag_sha})\n")
|
||||
string(APPEND port_data "set(${qt_port}_URL \"https://code.qt.io/cgit/qt/${qt_port}.git\")\n")
|
||||
else()
|
||||
qt_get_url_filename("${qt_port}" urls filename)
|
||||
vcpkg_download_distfile(archive
|
||||
URLS ${urls}
|
||||
FILENAME "${filename}"
|
||||
SKIP_SHA512
|
||||
)
|
||||
file(SHA512 "${archive}" hash)
|
||||
string(APPEND msg "set(${qt_port}_HASH \"${hash}\")\n")
|
||||
string(APPEND port_data "set(${qt_port}_HASH \"${hash}\")\n")
|
||||
string(APPEND port_data "set(${qt_port}_URL \"${urls}\")\n")
|
||||
string(APPEND port_data "set(${qt_port}_FILENAME \"${filename}\")\n")
|
||||
endif()
|
||||
file(WRITE "${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/port.data.cmake" "${port_data}")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/port.data.cmake" "${CMAKE_CURRENT_LIST_DIR}/../../${qt_port}/port.data.cmake" @ONLY NEWLINE_STYLE LF)
|
||||
endforeach()
|
||||
message("${msg}")
|
||||
file(WRITE "${CMAKE_CURRENT_LIST_DIR}/qt_port_data_new.cmake" "${msg}")
|
||||
message(FATAL_ERROR "Done downloading version and emitting hashes.")
|
||||
endif()
|
||||
|
||||
include("${CURRENT_PORT_DIR}/port.data.cmake")
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/QtBuildPathsHelpers.cmake b/cmake/QtBuildPathsHelpers.cmake
|
||||
index bd186c28b..edee52e8b 100644
|
||||
--- a/cmake/QtBuildPathsHelpers.cmake
|
||||
+++ b/cmake/QtBuildPathsHelpers.cmake
|
||||
@@ -100,7 +100,7 @@ function(qt_internal_set_up_global_paths)
|
||||
if(QT_CONFIG_INSTALL_DIR)
|
||||
string(APPEND QT_CONFIG_INSTALL_DIR "/")
|
||||
endif()
|
||||
- string(APPEND QT_CONFIG_INSTALL_DIR ${__config_path_part})
|
||||
+ string(APPEND QT_CONFIG_INSTALL_DIR "share")
|
||||
|
||||
set(QT_BUILD_DIR "${QT_BUILD_DIR}" PARENT_SCOPE)
|
||||
set(QT_INSTALL_DIR "${QT_INSTALL_DIR}" PARENT_SCOPE)
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
|
||||
index 4f8106dfa..bec5c402e 100644
|
||||
--- a/cmake/QtPostProcessHelpers.cmake
|
||||
+++ b/cmake/QtPostProcessHelpers.cmake
|
||||
@@ -414,7 +414,7 @@ function(qt_generate_install_prefixes out_var)
|
||||
|
||||
foreach(var ${vars})
|
||||
get_property(docstring CACHE "${var}" PROPERTY HELPSTRING)
|
||||
- string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\" FORCE)\n")
|
||||
+ string(APPEND content "set(${var} \"${${var}}\" CACHE STRING \"${docstring}\")\n")
|
||||
endforeach()
|
||||
|
||||
set(${out_var} "${content}" PARENT_SCOPE)
|
||||
@@ -0,0 +1,16 @@
|
||||
diff --git a/cmake/QtTestHelpers.cmake b/cmake/QtTestHelpers.cmake
|
||||
index 279ab07dd..951fd3d36 100644
|
||||
--- a/cmake/QtTestHelpers.cmake
|
||||
+++ b/cmake/QtTestHelpers.cmake
|
||||
@@ -653,9 +653,9 @@ function(qt_internal_collect_command_environment out_path out_plugin_path)
|
||||
# The regular CMAKE_INSTALL_PREFIX can be different for example when building standalone tests.
|
||||
# Any given CMAKE_INSTALL_PREFIX takes priority over qt_relocatable_install_prefix for the
|
||||
# PATH environment variable.
|
||||
- set(install_prefixes "${CMAKE_INSTALL_PREFIX}")
|
||||
+ set(install_prefixes "${CMAKE_INSTALL_PREFIX}$<$<CONFIG:DEBUG>:/debug>")
|
||||
if(QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX)
|
||||
- list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
|
||||
+ list(APPEND install_prefixes "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}$<$<CONFIG:DEBUG>:/debug>")
|
||||
endif()
|
||||
|
||||
file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}" test_env_path)
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/cmake/QtTargetHelpers.cmake b/cmake/QtTargetHelpers.cmake
|
||||
index 180ec33..a03e3b1 100644
|
||||
--- a/cmake/QtTargetHelpers.cmake
|
||||
+++ b/cmake/QtTargetHelpers.cmake
|
||||
@@ -281,10 +281,10 @@ function(qt_internal_add_target_aliases target)
|
||||
set_target_properties("${target}" PROPERTIES _qt_versionfull_alias "${versionfull_alias}")
|
||||
|
||||
get_target_property(type "${target}" TYPE)
|
||||
- if (type STREQUAL EXECUTABLE)
|
||||
+ if (type STREQUAL EXECUTABLE AND NOT TARGET "${versionfull_alias}")
|
||||
add_executable("${versionless_alias}" ALIAS "${target}")
|
||||
add_executable("${versionfull_alias}" ALIAS "${target}")
|
||||
- else()
|
||||
+ elseif(NOT type STREQUAL EXECUTABLE)
|
||||
add_library("${versionless_alias}" ALIAS "${target}")
|
||||
add_library("${versionfull_alias}" ALIAS "${target}")
|
||||
endif()
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
|
||||
index 1234567..abcdefg 100644
|
||||
--- a/src/corelib/configure.cmake
|
||||
+++ b/src/corelib/configure.cmake
|
||||
@@ -830,6 +830,6 @@ qt_feature("windows-ioring" PRIVATE
|
||||
LABEL "Windows I/O Ring"
|
||||
AUTODETECT WIN32
|
||||
- CONDITION TEST_windows_ioring
|
||||
+ CONDITION TEST_windows_ioring AND CMAKE_SIZEOF_VOID_P EQUAL 8
|
||||
)
|
||||
qt_feature("windows-ioring-skip-builder-param-checks" PRIVATE
|
||||
LABEL "Windows I/O Ring IORING_CREATE_SKIP_BUILDER_PARAM_CHECKS"
|
||||
@@ -0,0 +1,21 @@
|
||||
diff --git a/cmake/FindWrapResolv.cmake b/cmake/FindWrapResolv.cmake
|
||||
index 159df9b..412a2ae 100644
|
||||
--- a/cmake/FindWrapResolv.cmake
|
||||
+++ b/cmake/FindWrapResolv.cmake
|
||||
@@ -18,4 +18,7 @@ if(QNX)
|
||||
find_library(LIBRESOLV socket)
|
||||
else()
|
||||
find_library(LIBRESOLV resolv)
|
||||
+ if(APPLE AND NOT LIBRESOLV)
|
||||
+ set(LIBRESOLV resolv)
|
||||
+ endif()
|
||||
endif()
|
||||
@@ -40,7 +43,7 @@ check_cxx_source_compiles("
|
||||
|
||||
int main(int, char **argv)
|
||||
{
|
||||
- res_state statep = {};
|
||||
+ res_state statep = nullptr;
|
||||
int n = res_nmkquery(statep, 0, argv[1], 0, 0, NULL, 0, NULL, NULL, 0);
|
||||
n = res_nsend(statep, NULL, 0, NULL, 0);
|
||||
n = dn_expand(NULL, NULL, NULL, NULL, 0);
|
||||
@@ -0,0 +1,32 @@
|
||||
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
|
||||
index 1ca9728..b9f5d67 100644
|
||||
--- a/src/corelib/CMakeLists.txt
|
||||
+++ b/src/corelib/CMakeLists.txt
|
||||
@@ -754,10 +754,10 @@ qt_internal_extend_target(Core CONDITION QCC
|
||||
)
|
||||
|
||||
qt_internal_extend_target(Core CONDITION QT_FEATURE_liburing
|
||||
SOURCES
|
||||
io/qioring.cpp io/qioring_linux.cpp io/qioring_p.h
|
||||
LIBRARIES
|
||||
- uring
|
||||
+ PkgConfig::Liburing
|
||||
)
|
||||
|
||||
qt_internal_extend_target(Core CONDITION QT_FEATURE_windows_ioring
|
||||
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
|
||||
index d7ec27c..170e433 100644
|
||||
--- a/src/corelib/configure.cmake
|
||||
+++ b/src/corelib/configure.cmake
|
||||
@@ -405,10 +405,10 @@ int main(void)
|
||||
")
|
||||
|
||||
# liburing
|
||||
qt_config_compile_test(liburing
|
||||
LABEL "liburing"
|
||||
- LIBRARIES uring
|
||||
+ LIBRARIES PkgConfig::Liburing
|
||||
CODE
|
||||
"#include <liburing.h>
|
||||
|
||||
int main(void)
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/cmake/QtPriHelpers.cmake b/cmake/QtPriHelpers.cmake
|
||||
index b6f1242..eaa4d65 100644
|
||||
--- a/cmake/QtPriHelpers.cmake
|
||||
+++ b/cmake/QtPriHelpers.cmake
|
||||
@@ -37,6 +37,7 @@ function(qt_generate_qmake_libraries_pri_content module_name output_root_dir out
|
||||
get_target_property(lib_target_type ${lib_target} TYPE)
|
||||
if(lib_target_type MATCHES "^(INTERFACE|UNKNOWN)_LIBRARY")
|
||||
get_target_property(iface_libs ${lib_target} INTERFACE_LINK_LIBRARIES)
|
||||
+ string(REGEX REPLACE [[\$<LINK_ONLY:([^>]+)>]] "\\1" iface_libs "${iface_libs}")
|
||||
if(iface_libs)
|
||||
list(PREPEND lib_targets ${iface_libs})
|
||||
endif()
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in
|
||||
index ffc9d90f8..0b3a7d59e 100644
|
||||
--- a/cmake/QtBuildInternalsExtra.cmake.in
|
||||
+++ b/cmake/QtBuildInternalsExtra.cmake.in
|
||||
@@ -51,8 +51,8 @@ endif()
|
||||
set(QT_WILL_INSTALL @QT_WILL_INSTALL@ CACHE BOOL
|
||||
"Boolean indicating if doing a Qt prefix build (vs non-prefix build)." FORCE)
|
||||
|
||||
-set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
|
||||
-"A path to the source tree of the previously configured QtBase project." FORCE)
|
||||
+# set(QT_SOURCE_TREE "@QT_SOURCE_TREE@" CACHE PATH
|
||||
+# "A path to the source tree of the previously configured QtBase project." FORCE)
|
||||
|
||||
# Propagate decision of building tests and examples to other repositories.
|
||||
set(QT_BUILD_TESTS @QT_BUILD_TESTS@ CACHE BOOL "Build the testing tree.")
|
||||
@@ -0,0 +1,33 @@
|
||||
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
|
||||
index bfac685..c232c3e 100644
|
||||
--- a/src/corelib/Qt6CoreMacros.cmake
|
||||
+++ b/src/corelib/Qt6CoreMacros.cmake
|
||||
@@ -3225,7 +3225,7 @@ function(_qt_internal_setup_deploy_support)
|
||||
set(qtpaths_name_candidates "")
|
||||
foreach(base_name IN LISTS base_names)
|
||||
if(CMAKE_HOST_WIN32)
|
||||
- if(CMAKE_CROSSCOMPILING)
|
||||
+ if(CMAKE_CROSSCOMPILING AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(qt_paths_ext ".bat")
|
||||
# Depending on whether QT_FORCE_BUILD_TOOLS was set when building Qt, a 'host-'
|
||||
# prefix is prepended to the created qtpaths wrapper, not to collide with the
|
||||
@@ -3234,6 +3234,10 @@ function(_qt_internal_setup_deploy_support)
|
||||
# project configuration, search for both, with the bare one searched first.
|
||||
list(APPEND qtpaths_name_candidates "${base_name}${qt_paths_ext}")
|
||||
list(APPEND qtpaths_name_candidates "host-${base_name}${qt_paths_ext}")
|
||||
+ elseif(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
+ set(qt_paths_ext ".debug.bat")
|
||||
+ list(APPEND qtpaths_name_candidates "${base_name}${qt_paths_ext}")
|
||||
+ list(APPEND qtpaths_name_candidates "host-${base_name}${qt_paths_ext}")
|
||||
else()
|
||||
set(qt_paths_ext ".exe")
|
||||
list(APPEND qtpaths_name_candidates "${base_name}${qt_paths_ext}")
|
||||
@@ -3243,7 +3247,7 @@ function(_qt_internal_setup_deploy_support)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
- set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}")
|
||||
+ set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/tools/Qt6/bin")
|
||||
|
||||
set(candidate_paths "")
|
||||
foreach(qtpaths_name_candidate IN LISTS qtpaths_name_candidates)
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
index eafbc1ff9..dd4068838 100644
|
||||
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
@@ -82,6 +82,7 @@ find_path(EGL_INCLUDE_DIR
|
||||
find_library(EGL_LIBRARY
|
||||
NAMES
|
||||
EGL
|
||||
+ libEGL # required to find angle on windows within vcpkg.
|
||||
HINTS
|
||||
${PKG_EGL_LIBRARY_DIRS}
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
index db48f79b9..4b1686132 100644
|
||||
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake
|
||||
@@ -116,7 +116,7 @@ if(EGL_INCLUDE_DIR)
|
||||
unset(_EGL_version_lines)
|
||||
endif()
|
||||
|
||||
-cmake_push_check_state(RESET)
|
||||
+cmake_push_check_state() # To be able to fix the compile check in vcpkg-cmake-wrapper
|
||||
list(APPEND CMAKE_REQUIRED_LIBRARIES "${EGL_LIBRARY}")
|
||||
list(APPEND CMAKE_REQUIRED_INCLUDES "${EGL_INCLUDE_DIR}")
|
||||
list(APPEND CMAKE_REQUIRED_DEFINITIONS "${EGL_DEFINITIONS}")
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/cmake/FindWrapSystemHarfbuzz.cmake b/cmake/FindWrapSystemHarfbuzz.cmake
|
||||
index 3cb44aa76..9bf0d7165 100644
|
||||
--- a/cmake/FindWrapSystemHarfbuzz.cmake
|
||||
+++ b/cmake/FindWrapSystemHarfbuzz.cmake
|
||||
@@ -6,7 +6,7 @@ if(TARGET WrapSystemHarfbuzz::WrapSystemHarfbuzz)
|
||||
endif()
|
||||
set(WrapSystemHarfbuzz_REQUIRED_VARS __harfbuzz_found)
|
||||
|
||||
-find_package(harfbuzz ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} QUIET)
|
||||
+find_package(harfbuzz QUIET) # VCPKG is missing the version file for harfbuzz.
|
||||
|
||||
# Gentoo has some buggy version of a harfbuzz Config file. Check if include paths are valid.
|
||||
set(__harfbuzz_target_name "harfbuzz::harfbuzz")
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/cmake/qt.toolchain.cmake.in b/cmake/qt.toolchain.cmake.in
|
||||
index 6e37ae02..e7e84468 100644
|
||||
--- a/cmake/qt.toolchain.cmake.in
|
||||
+++ b/cmake/qt.toolchain.cmake.in
|
||||
@@ -65,6 +65,10 @@ get_filename_component(QT_TOOLCHAIN_RELOCATABLE_INSTALL_PREFIX
|
||||
# one level higher is what we're looking for.
|
||||
get_filename_component(QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
|
||||
|
||||
+get_filename_component(vcpkg_installed_dir
|
||||
+ ${CMAKE_CURRENT_LIST_DIR}/../../../
|
||||
+ ABSOLUTE)
|
||||
+
|
||||
# REROOT_PATH_ISSUE_MARKER
|
||||
# There's a subdirectory check in cmake's cmFindCommon::RerootPaths() function, that doesn't handle
|
||||
# the case of CMAKE_PREFIX_PATH == CMAKE_FIND_ROOT_PATH for a particular pair of entries.
|
||||
@@ -0,0 +1,33 @@
|
||||
diff --git a/src/tools/macdeployqt/shared/shared.cpp b/src/tools/macdeployqt/shared/shared.cpp
|
||||
index 6ff269b..caffd44 100644
|
||||
--- a/src/tools/macdeployqt/shared/shared.cpp
|
||||
+++ b/src/tools/macdeployqt/shared/shared.cpp
|
||||
@@ -1,4 +1,5 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
+
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
#include <QCoreApplication>
|
||||
#include <QString>
|
||||
@@ -85,7 +86,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (QFile::copy(from, to)) {
|
||||
+ QFileInfo fromFileInfo(from);
|
||||
+
|
||||
+ if (fromFileInfo.isSymLink()) {
|
||||
+ const QString fromSymLinkTarget = fromFileInfo.absoluteDir().relativeFilePath(fromFileInfo.symLinkTarget());
|
||||
+ if (QFile::link(fromSymLinkTarget, to)) {
|
||||
+ return copyFilePrintStatus(fromFileInfo.absoluteDir().absoluteFilePath(fromSymLinkTarget), QFileInfo(to).absoluteDir().absoluteFilePath(fromSymLinkTarget));
|
||||
+ }
|
||||
+ else {
|
||||
+ LogError() << "symlink copy failed from" << from;
|
||||
+ LogError() << " to" << to;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ else if (QFile::copy(from, to)) {
|
||||
QFile dest(to);
|
||||
dest.setPermissions(dest.permissions() | QFile::WriteOwner | QFile::WriteUser);
|
||||
LogNormal() << " copied:" << from;
|
||||
@@ -0,0 +1,17 @@
|
||||
diff --git a/src/gui/text/qtextmarkdownimporter.cpp b/src/gui/text/qtextmarkdownimporter.cpp
|
||||
index e7bab8b..e4cc520 100644
|
||||
--- a/src/gui/text/qtextmarkdownimporter.cpp
|
||||
+++ b/src/gui/text/qtextmarkdownimporter.cpp
|
||||
@@ -50,8 +50,10 @@ static_assert(int(QTextMarkdownImporter::FeaturePermissiveAutoLinks) == MD_FLAG_
|
||||
static_assert(int(QTextMarkdownImporter::FeatureTasklists) == MD_FLAG_TASKLISTS);
|
||||
static_assert(int(QTextMarkdownImporter::FeatureNoHTML) == MD_FLAG_NOHTML);
|
||||
static_assert(int(QTextMarkdownImporter::DialectCommonMark) == MD_DIALECT_COMMONMARK);
|
||||
-static_assert(int(QTextMarkdownImporter::DialectGitHub) ==
|
||||
- (MD_DIALECT_GITHUB | MD_FLAG_UNDERLINE | QTextMarkdownImporter::FeatureFrontMatter));
|
||||
+// md4c's MD_DIALECT_GITHUB now also ORs in MD_FLAG_ADMONITIONS and MD_FLAG_FOOTNOTES
|
||||
+// (features Qt's Feature enum predates and never sets), so it no longer equals
|
||||
+// QTextMarkdownImporter::DialectGitHub. The flags are forwarded to md_parse() as-is,
|
||||
+// so parsing behavior for the dialect Qt exposes is unaffected.
|
||||
|
||||
// --------------------------------------------------------
|
||||
// MD4C callback function wrappers
|
||||
@@ -0,0 +1,15 @@
|
||||
diff --git a/cmake/FindWrapVulkanHeaders.cmake b/cmake/FindWrapVulkanHeaders.cmake
|
||||
index 92510ae..afd931f 100644
|
||||
--- a/cmake/FindWrapVulkanHeaders.cmake
|
||||
+++ b/cmake/FindWrapVulkanHeaders.cmake
|
||||
@@ -29,6 +29,10 @@ if(Vulkan_INCLUDE_DIR)
|
||||
|
||||
# Also propagate MoltenVK include directory on Apple platforms if found.
|
||||
if(APPLE)
|
||||
+ find_package(Vulkan OPTIONAL_COMPONENTS MoltenVK)
|
||||
+ if(Vulkan_MoltenVK_FOUND)
|
||||
+ target_link_libraries(WrapVulkanHeaders::WrapVulkanHeaders INTERFACE Vulkan::MoltenVK)
|
||||
+ endif()
|
||||
# Check for the LunarG Vulkan SDK folder structure.
|
||||
set(__qt_molten_vk_include_path "${Vulkan_INCLUDE_DIR}/../../MoltenVK/include")
|
||||
get_filename_component(
|
||||
@@ -0,0 +1,3 @@
|
||||
set(qtbase_HASH "2ebca39bd74a76563c7fb139de3eac69334ba7788c74d113e7b9f8cfaab5aa46700f0f27e80cc70096f98f1217a43b8b95083cba8fc7f185b54551f20bbe6815")
|
||||
set(qtbase_URL "https://github.com/aphrody-labs/qtbase/archive/7a59d906fb765eb85759d4d3cae45d3f295f6359.tar.gz")
|
||||
set(qtbase_FILENAME "aphrody-labs-qtbase-7a59d906fb765eb85759d4d3cae45d3f295f6359.tar.gz")
|
||||
@@ -0,0 +1,653 @@
|
||||
# Reminder for myself and everybody else:
|
||||
# Qt cross module dependency information within the Qt respository is wrong and/or incomplete.
|
||||
# Always check the toplevel CMakeLists.txt for the find_package call and search for linkage against the Qt:: targets
|
||||
# Often enough certain (bigger) dependencies are only used to build examples and/or tests.
|
||||
# As such getting the correct dependency information relevant for vcpkg requires a manual search/check
|
||||
set(QT_IS_LATEST ON)
|
||||
|
||||
## All above goes into the qt_port_hashes in the future
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/qt_install_submodule.cmake")
|
||||
|
||||
set(${PORT}_PATCHES
|
||||
allow_outside_prefix.patch
|
||||
config_install.patch
|
||||
fix_cmake_build.patch
|
||||
harfbuzz.patch
|
||||
fix_egl.patch
|
||||
fix_egl_2.patch
|
||||
installed_dir.patch
|
||||
GLIB2-static.patch # alternative is to force pkg-config
|
||||
clang-cl_source_location.patch
|
||||
clang-cl_QGADGET_fix.diff
|
||||
fix-host-aliasing.patch
|
||||
fix_deploy_windows.patch
|
||||
windeployqt-webengine-debug-resources.patch
|
||||
fix-link-lib-discovery.patch
|
||||
macdeployqt-symlinks.patch
|
||||
moltenvk.patch
|
||||
fix-ioring-32bit.patch
|
||||
fix-liburing-config-test.patch
|
||||
fix-libresolv-test.patch
|
||||
use_inotify_on_freebsd.patch
|
||||
silence-winrtbase-coroutine-warnings.diff
|
||||
md4c.diff
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
list(APPEND ${PORT}_PATCHES env.patch)
|
||||
endif()
|
||||
|
||||
if("shared-mime-info" IN_LIST FEATURES)
|
||||
list(APPEND ${PORT}_PATCHES use-shared-mime-info.patch)
|
||||
endif()
|
||||
|
||||
list(APPEND ${PORT}_PATCHES
|
||||
dont_force_cmakecache_latest.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT "doubleconversion" IN_LIST FEATURES)
|
||||
message(FATAL_ERROR "${PORT} requires feature doubleconversion on windows!" )
|
||||
endif()
|
||||
|
||||
# Feature like glib depend on pkg-config
|
||||
vcpkg_find_acquire_program(PKGCONFIG)
|
||||
set(ENV{PKG_CONFIG} "${PKGCONFIG}")
|
||||
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
message(WARNING "qtbase currently requires packages from the system package manager. "
|
||||
"They can be installed on Ubuntu systems via sudo apt-get install "
|
||||
"'^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev "
|
||||
"libxkbcommon-x11-dev libegl1-mesa-dev.")
|
||||
endif()
|
||||
|
||||
# Features can be found via searching for qt_feature in all configure.cmake files in the source:
|
||||
# The files also contain information about the Platform for which it is searched
|
||||
# Always use FEATURE_<feature> in vcpkg_cmake_configure
|
||||
# (using QT_FEATURE_X overrides Qts condition check for the feature.)
|
||||
# Theoretically there is a feature for every widget to enable/disable it but that is way to much for vcpkg
|
||||
|
||||
set(input_vars doubleconversion freetype harfbuzz libb2 jpeg md4c png sql-sqlite)
|
||||
set(INPUT_OPTIONS "")
|
||||
foreach(_input IN LISTS input_vars)
|
||||
if(_input MATCHES "(png|jpeg|md4c)" )
|
||||
list(APPEND INPUT_OPTIONS -DINPUT_lib${_input}:STRING=)
|
||||
elseif(_input MATCHES "(sql-sqlite)") # Not yet used by the cmake build
|
||||
else()
|
||||
list(APPEND INPUT_OPTIONS -DINPUT_${_input}:STRING=)
|
||||
endif()
|
||||
if("${_input}" IN_LIST FEATURES)
|
||||
string(APPEND INPUT_OPTIONS system)
|
||||
elseif(_input STREQUAL "libb2" AND NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
string(APPEND INPUT_OPTIONS system)
|
||||
elseif(_input STREQUAL "md4c") # required by qtdeclarative
|
||||
string(APPEND INPUT_OPTIONS system)
|
||||
else()
|
||||
string(APPEND INPUT_OPTIONS no)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# General features:
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
"appstore-compliant" FEATURE_appstore_compliant
|
||||
"zstd" FEATURE_zstd
|
||||
"framework" FEATURE_framework
|
||||
"concurrent" FEATURE_concurrent
|
||||
"future" FEATURE_future
|
||||
"dbus" FEATURE_dbus
|
||||
"gui" FEATURE_gui
|
||||
"thread" FEATURE_thread
|
||||
"network" FEATURE_network
|
||||
"sql" FEATURE_sql
|
||||
"widgets" FEATURE_widgets
|
||||
"windeployqt" FEATURE_windeployqt
|
||||
#"xml" FEATURE_xml # Required to build moc
|
||||
"testlib" FEATURE_testlib
|
||||
"zstd" CMAKE_REQUIRE_FIND_PACKAGE_zstd
|
||||
${require_features}
|
||||
INVERTED_FEATURES
|
||||
"zstd" CMAKE_DISABLE_FIND_PACKAGE_ZSTD
|
||||
"dbus" CMAKE_DISABLE_FIND_PACKAGE_WrapDBus1
|
||||
)
|
||||
|
||||
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libudev:BOOL=ON)
|
||||
list(APPEND FEATURE_OPTIONS -DFEATURE_xml:BOOL=ON)
|
||||
|
||||
if("dbus" IN_LIST FEATURES AND VCPKG_TARGET_IS_LINUX)
|
||||
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=linked)
|
||||
elseif("dbus" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=runtime)
|
||||
else()
|
||||
list(APPEND FEATURE_OPTIONS -DINPUT_dbus=no)
|
||||
endif()
|
||||
|
||||
if(VCPKG_QT_NAMESPACE)
|
||||
list(APPEND FEATURE_OPTIONS "-DQT_NAMESPACE:STRING=${VCPKG_QT_NAMESPACE}")
|
||||
endif()
|
||||
|
||||
# Corelib features:
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_CORE_OPTIONS
|
||||
FEATURES
|
||||
"doubleconversion" FEATURE_doubleconversion
|
||||
"glib" FEATURE_glib
|
||||
"icu" FEATURE_icu
|
||||
"pcre2" FEATURE_pcre2
|
||||
"async-io" FEATURE_async_io
|
||||
#"icu" CMAKE_REQUIRE_FIND_PACKAGE_ICU
|
||||
#"glib" CMAKE_REQUIRE_FIND_PACKAGE_GLIB2
|
||||
INVERTED_FEATURES
|
||||
#"doubleconversion" CMAKE_DISABLE_FIND_PACKAGE_WrapDoubleConversion # Required
|
||||
#"pcre2" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemPCRE2 # Bug in qt cannot be deactivated
|
||||
"icu" CMAKE_DISABLE_FIND_PACKAGE_ICU
|
||||
"glib" CMAKE_DISABLE_FIND_PACKAGE_GLIB2
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_LINUX)
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OS_CORE_OPTIONS
|
||||
FEATURES
|
||||
"ioring" FEATURE_liburing
|
||||
)
|
||||
elseif(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OS_CORE_OPTIONS
|
||||
FEATURES
|
||||
"ioring" FEATURE_windows_ioring
|
||||
)
|
||||
endif()
|
||||
|
||||
list(APPEND FEATURE_CORE_OPTIONS ${FEATURE_OS_CORE_OPTIONS})
|
||||
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_LTTngUST:BOOL=ON)
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_PPS:BOOL=ON)
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Slog2:BOOL=ON)
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libsystemd:BOOL=ON)
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapBacktrace:BOOL=ON)
|
||||
list(APPEND FEATURE_CORE_OPTIONS -DFEATURE_pkg_config:BOOL=ON)
|
||||
#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapAtomic:BOOL=ON) # Cannot be disabled on x64 platforms
|
||||
#list(APPEND FEATURE_CORE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_WrapRt:BOOL=ON) # Cannot be disabled on osx
|
||||
|
||||
# Network features:
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_NET_OPTIONS
|
||||
FEATURES
|
||||
"openssl" FEATURE_openssl
|
||||
"brotli" FEATURE_brotli
|
||||
"securetransport" FEATURE_securetransport
|
||||
"dnslookup" FEATURE_dnslookup
|
||||
#"brotli" CMAKE_REQUIRE_FIND_PACKAGE_WrapBrotli
|
||||
#"openssl" CMAKE_REQUIRE_FIND_PACKAGE_WrapOpenSSL
|
||||
INVERTED_FEATURES
|
||||
"brotli" CMAKE_DISABLE_FIND_PACKAGE_WrapBrotli
|
||||
"openssl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenSSL
|
||||
"dnslookup" CMAKE_DISABLE_FIND_PACKAGE_WrapResolve
|
||||
)
|
||||
|
||||
if("openssl" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=linked)
|
||||
else()
|
||||
list(APPEND FEATURE_NET_OPTIONS -DINPUT_openssl=no)
|
||||
endif()
|
||||
|
||||
if ("dnslookup" IN_LIST FEATURES AND NOT VCPKG_TARGET_IS_ANDROID AND NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND FEATURE_NET_OPTIONS -DFEATURE_libresolv:BOOL=ON)
|
||||
endif()
|
||||
|
||||
list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libproxy:BOOL=ON)
|
||||
list(APPEND FEATURE_NET_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_GSSAPI:BOOL=ON)
|
||||
|
||||
# Gui features:
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_GUI_OPTIONS
|
||||
FEATURES
|
||||
"freetype" FEATURE_freetype # required on windows
|
||||
"harfbuzz" FEATURE_harfbuzz
|
||||
"fontconfig" FEATURE_fontconfig # NOT WINDOWS
|
||||
"jpeg" FEATURE_jpeg
|
||||
"png" FEATURE_png
|
||||
"opengl" FEATURE_opengl
|
||||
"sessionmanager" FEATURE_sessionmanager
|
||||
"xlib" FEATURE_xlib
|
||||
"xkb" FEATURE_xkbcommon
|
||||
"xcb" FEATURE_xcb
|
||||
"xcb-sm" FEATURE_xcb_sm
|
||||
"xcb-xlib" FEATURE_xcb_xlib
|
||||
"xkbcommon-x11" FEATURE_xkbcommon_x11
|
||||
"xrender" FEATURE_xrender # requires FEATURE_xcb_native_painting; otherwise disabled.
|
||||
"xrender" FEATURE_xcb_native_painting # experimental
|
||||
"gles2" FEATURE_opengles2
|
||||
"gles3" FEATURE_opengles3
|
||||
#Cannot be required since Qt will look in CONFIG mode first but is controlled via CMAKE_DISABLE_FIND_PACKAGE_Vulkan below
|
||||
#"vulkan" CMAKE_REQUIRE_FIND_PACKAGE_WrapVulkanHeaders
|
||||
"egl" FEATURE_egl
|
||||
#"fontconfig" CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig
|
||||
#"harfbuzz" CMAKE_REQUIRE_FIND_PACKAGE_WrapSystemHarfbuzz
|
||||
#"jpeg" CMAKE_REQUIRE_FIND_PACKAGE_JPEG
|
||||
#"png" CMAKE_REQUIRE_FIND_PACKAGE_PNG
|
||||
"wayland" FEATURE_wayland
|
||||
#"xlib" CMAKE_REQUIRE_FIND_PACKAGE_X11
|
||||
#"xkb" CMAKE_REQUIRE_FIND_PACKAGE_XKB
|
||||
#"xcb" CMAKE_REQUIRE_FIND_PACKAGE_XCB
|
||||
#"xcb-xlib" CMAKE_REQUIRE_FIND_PACKAGE_X11_XCB
|
||||
#"xkbcommon-x11" CMAKE_REQUIRE_FIND_PACKAGE_XKB_COMMON_X11
|
||||
#"xrender" CMAKE_REQUIRE_FIND_PACKAGE_XRender
|
||||
INVERTED_FEATURES
|
||||
"vulkan" CMAKE_DISABLE_FIND_PACKAGE_Vulkan
|
||||
"opengl" CMAKE_DISABLE_FIND_PACKAGE_WrapOpenGL
|
||||
"egl" CMAKE_DISABLE_FIND_PACKAGE_EGL
|
||||
"gles2" CMAKE_DISABLE_FIND_PACKAGE_GLESv2
|
||||
"gles3" CMAKE_DISABLE_FIND_PACKAGE_GLESv3
|
||||
"fontconfig" CMAKE_DISABLE_FIND_PACKAGE_Fontconfig
|
||||
#"freetype" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemFreetype # Bug in qt cannot be deactivated
|
||||
"harfbuzz" CMAKE_DISABLE_FIND_PACKAGE_WrapSystemHarfbuzz
|
||||
"jpeg" CMAKE_DISABLE_FIND_PACKAGE_JPEG
|
||||
#"png" CMAKE_DISABLE_FIND_PACKAGE_PNG # Unable to disable if Freetype requires it
|
||||
"wayland" CMAKE_DISABLE_FIND_PACKAGE_Wayland
|
||||
"xlib" CMAKE_DISABLE_FIND_PACKAGE_X11
|
||||
"xkb" CMAKE_DISABLE_FIND_PACKAGE_XKB
|
||||
"xcb" CMAKE_DISABLE_FIND_PACKAGE_XCB
|
||||
"xcb-xlib" CMAKE_DISABLE_FIND_PACKAGE_X11_XCB
|
||||
"xkbcommon-x11" CMAKE_DISABLE_FIND_PACKAGE_XKB_COMMON_X11
|
||||
"xrender" CMAKE_DISABLE_FIND_PACKAGE_XRender
|
||||
# There are more X features but I am unsure how to safely disable them! Most of them seem to be found automaticall with find_package(X11)
|
||||
)
|
||||
|
||||
if("gles2" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='es2')
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF)
|
||||
endif()
|
||||
|
||||
if(NOT "opengl" IN_LIST FEATURES AND NOT "gles2" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_opengl='no')
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_desktop=OFF)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengl_dynamic=OFF)
|
||||
endif()
|
||||
|
||||
if("xcb" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=yes)
|
||||
else()
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xcb=no)
|
||||
endif()
|
||||
if("xkb" IN_LIST FEATURES)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=yes)
|
||||
else()
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DINPUT_xkbcommon=no)
|
||||
endif()
|
||||
|
||||
# Disable OpenGL ES 3.1 and 3.2
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles31:BOOL=OFF)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DFEATURE_opengles32:BOOL=OFF)
|
||||
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_ATSPI2:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_DirectFB:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libdrm:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_gbm:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Libinput:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Mtdev:BOOL=ON)
|
||||
list(APPEND FEATURE_GUI_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_Tslib:BOOL=ON)
|
||||
# sql-drivers features:
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_SQLDRIVERS_OPTIONS
|
||||
FEATURES
|
||||
"sql-sqlite" FEATURE_system_sqlite
|
||||
"sql-odbc" FEATURE_sql_odbc
|
||||
"sql-mysql" FEATURE_sql_mysql
|
||||
"sql-oci" FEATURE_sql_oci
|
||||
#"sql-psql" CMAKE_REQUIRE_FIND_PACKAGE_PostgreSQL
|
||||
#"sql-sqlite" CMAKE_REQUIRE_FIND_PACKAGE_SQLite3
|
||||
INVERTED_FEATURES
|
||||
"sql-psql" CMAKE_DISABLE_FIND_PACKAGE_PostgreSQL
|
||||
"sql-sqlite" CMAKE_DISABLE_FIND_PACKAGE_SQLite3
|
||||
"sql-odbc" CMAKE_DISABLE_FIND_PACKAGE_ODBC
|
||||
"sql-mysql" CMAKE_DISABLE_FIND_PACKAGE_MySQL
|
||||
"sql-oci" CMAKE_DISABLE_FIND_PACKAGE_Oracle
|
||||
)
|
||||
|
||||
set(DB_LIST DB2 Interbase Mimer)
|
||||
foreach(_db IN LISTS DB_LIST)
|
||||
list(APPEND FEATURE_SQLDRIVERS_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${_db}:BOOL=ON)
|
||||
endforeach()
|
||||
|
||||
# printsupport features:
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_PRINTSUPPORT_OPTIONS
|
||||
FEATURES
|
||||
"cups" FEATURE_cups
|
||||
INVERTED_FEATURES
|
||||
"cups" CMAKE_DISABLE_FIND_PACKAGE_Cups
|
||||
)
|
||||
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_WIDGETS_OPTIONS
|
||||
FEATURES
|
||||
"gtk3" FEATURE_gtk3
|
||||
INVERTED_FEATURES
|
||||
"gtk3" CMAKE_DISABLE_FIND_PACKAGE_GTK3
|
||||
)
|
||||
|
||||
set(TOOL_NAMES
|
||||
androiddeployqt
|
||||
androidtestrunner
|
||||
cmake_automoc_parser
|
||||
moc
|
||||
qdbuscpp2xml
|
||||
qdbusxml2cpp
|
||||
qlalr
|
||||
qmake
|
||||
qmake6
|
||||
qvkgen
|
||||
rcc
|
||||
tracegen
|
||||
uic
|
||||
qtpaths
|
||||
qtpaths6
|
||||
windeployqt
|
||||
windeployqt6
|
||||
macdeployqt
|
||||
macdeployqt6
|
||||
androiddeployqt6
|
||||
syncqt
|
||||
tracepointgen
|
||||
qtwaylandscanner
|
||||
wasmdeployqt
|
||||
wasmdeployqt6
|
||||
)
|
||||
|
||||
qt_install_submodule(PATCHES ${${PORT}_PATCHES}
|
||||
TOOL_NAMES ${TOOL_NAMES}
|
||||
CONFIGURE_OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
${FEATURE_CORE_OPTIONS}
|
||||
${FEATURE_NET_OPTIONS}
|
||||
${FEATURE_GUI_OPTIONS}
|
||||
${FEATURE_SQLDRIVERS_OPTIONS}
|
||||
${FEATURE_PRINTSUPPORT_OPTIONS}
|
||||
${FEATURE_WIDGETS_OPTIONS}
|
||||
${INPUT_OPTIONS}
|
||||
-DQT_USE_BUNDLED_BundledFreetype:BOOL=FALSE
|
||||
-DQT_USE_BUNDLED_BundledHarfbuzz:BOOL=FALSE
|
||||
-DQT_USE_BUNDLED_BundledLibpng:BOOL=FALSE
|
||||
-DQT_USE_BUNDLED_BundledPcre2:BOOL=FALSE
|
||||
-DINPUT_bundled_xcb_xinput:STRING=no
|
||||
-DFEATURE_force_debug_info:BOOL=ON
|
||||
-DFEATURE_relocatable:BOOL=ON
|
||||
-DQT_AUTODETECT_ANDROID:BOOL=ON # Use vcpkg toolchain as is
|
||||
-DQT_NO_XCODE_MIN_VERSION_CHECK:BOOL=ON # The cmd line tools are missing xcodebuild
|
||||
-DQT_FIND_APPLE_SYSTEM_FRAMEWORKS_MODE:STRING=ONLY
|
||||
CONFIGURE_OPTIONS_RELEASE
|
||||
CONFIGURE_OPTIONS_DEBUG
|
||||
-DFEATURE_debug:BOOL=ON
|
||||
CONFIGURE_OPTIONS_MAYBE_UNUSED
|
||||
FEATURE_appstore_compliant # only used for android/ios
|
||||
QT_AUTODETECT_ANDROID
|
||||
QT_NO_XCODE_MIN_VERSION_CHECK
|
||||
QT_FIND_APPLE_SYSTEM_FRAMEWORKS_MODE
|
||||
)
|
||||
|
||||
# Install CMake helper scripts
|
||||
file(COPY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/cmake/"
|
||||
DESTINATION
|
||||
"${CURRENT_PACKAGES_DIR}/share/${PORT}"
|
||||
)
|
||||
|
||||
file(CONFIGURE OUTPUT "${CURRENT_PACKAGES_DIR}/share/${PORT}/port_status.cmake" CONTENT "set(qtbase_with_icu ${FEATURE_icu})\n")
|
||||
|
||||
set(other_files qt-cmake
|
||||
qt-cmake-create
|
||||
qt-cmake-private
|
||||
qt-cmake-standalone-test
|
||||
qt-configure-module
|
||||
qt-internal-configure-tests
|
||||
qt-cmake-create
|
||||
qt-internal-configure-examples
|
||||
qt-internal-configure-tests
|
||||
qmake
|
||||
qmake6
|
||||
qtpaths
|
||||
qtpaths6
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
set(script_suffix ".bat")
|
||||
else()
|
||||
set(script_suffix "")
|
||||
endif()
|
||||
list(TRANSFORM other_files APPEND "${script_suffix}")
|
||||
|
||||
list(APPEND other_files
|
||||
android_cmakelist_patcher.sh
|
||||
android_emulator_launcher.sh
|
||||
ensure_pro_file.cmake
|
||||
qt-android-runner.py
|
||||
qt-cmake-private-install.cmake
|
||||
qt_cyclonedx_generator.py
|
||||
qt-testrunner.py
|
||||
qt-wasmtestrunner.py
|
||||
sanitizer-testrunner.py
|
||||
syncqt.pl
|
||||
target_qt.conf
|
||||
)
|
||||
|
||||
foreach(_config debug release)
|
||||
if(_config MATCHES "debug")
|
||||
set(path_suffix debug/)
|
||||
else()
|
||||
set(path_suffix)
|
||||
endif()
|
||||
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin")
|
||||
continue()
|
||||
endif()
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}")
|
||||
foreach(other_file IN LISTS other_files)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}")
|
||||
set(target_file "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${path_suffix}${other_file}")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/${path_suffix}bin/${other_file}" "${target_file}")
|
||||
file(READ "${target_file}" _contents)
|
||||
if(_config MATCHES "debug")
|
||||
string(REPLACE "..\\share\\" "..\\..\\..\\..\\share\\" _contents "${_contents}")
|
||||
string(REPLACE "../share/" "../../../../share/" _contents "${_contents}")
|
||||
else()
|
||||
string(REPLACE "..\\share\\" "..\\..\\..\\share\\" _contents "${_contents}")
|
||||
string(REPLACE "../share/" "../../../share/" _contents "${_contents}")
|
||||
endif()
|
||||
string(REGEX REPLACE "set cmake_path=[^\n]+\n" "set cmake_path=cmake\n" _contents "${_contents}")
|
||||
string(REGEX REPLACE "original_cmake_path=[^\n]+\n" "original_cmake_path=does-not-exist\n" _contents "${_contents}")
|
||||
file(WRITE "${target_file}" "${_contents}")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# Fixup qt.toolchain.cmake
|
||||
set(qttoolchain "${CURRENT_PACKAGES_DIR}/share/Qt6/qt.toolchain.cmake")
|
||||
file(READ "${qttoolchain}" toolchain_contents)
|
||||
string(REGEX REPLACE "set\\\(__qt_initially_configured_toolchain_file [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}")
|
||||
string(REGEX REPLACE "set\\\(__qt_chainload_toolchain_file [^\\\n]+\\\n" "set(__qt_chainload_toolchain_file \"\${VCPKG_CHAINLOAD_TOOLCHAIN_FILE}\")\n" toolchain_contents "${toolchain_contents}")
|
||||
string(REGEX REPLACE "set\\\(VCPKG_CHAINLOAD_TOOLCHAIN_FILE [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}")
|
||||
string(REGEX REPLACE "set\\\(__qt_initial_c_compiler [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}")
|
||||
string(REGEX REPLACE "set\\\(__qt_initial_cxx_compiler [^\\\n]+\\\n" "" toolchain_contents "${toolchain_contents}")
|
||||
string(REPLACE "${CURRENT_HOST_INSTALLED_DIR}" "\${vcpkg_installed_dir}/${HOST_TRIPLET}" toolchain_contents "${toolchain_contents}")
|
||||
file(WRITE "${qttoolchain}" "${toolchain_contents}")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/qmake" "${CURRENT_PACKAGES_DIR}/debug/bin/qmake") # qmake has been moved so this is the qmake helper script
|
||||
endif()
|
||||
file(GLOB_RECURSE _bin_files "${CURRENT_PACKAGES_DIR}/bin/*")
|
||||
if(NOT _bin_files) # Only clean if empty otherwise let vcpkg throw and error.
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin/" "${CURRENT_PACKAGES_DIR}/debug/bin/")
|
||||
else()
|
||||
message(STATUS "Files in '/bin':${_bin_files}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/QtBuildInternals")
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_OSX)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/macos")
|
||||
endif()
|
||||
if(NOT VCPKG_TARGET_IS_IOS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/ios")
|
||||
endif()
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Qt6/windows")
|
||||
endif()
|
||||
|
||||
file(RELATIVE_PATH installed_to_host "${CURRENT_INSTALLED_DIR}" "${CURRENT_HOST_INSTALLED_DIR}")
|
||||
file(RELATIVE_PATH host_to_installed "${CURRENT_HOST_INSTALLED_DIR}" "${CURRENT_INSTALLED_DIR}")
|
||||
if(installed_to_host)
|
||||
string(APPEND installed_to_host "/")
|
||||
string(APPEND host_to_installed "/")
|
||||
endif()
|
||||
set(_file "${CMAKE_CURRENT_LIST_DIR}/qt.conf.in")
|
||||
set(REL_PATH "")
|
||||
set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/")
|
||||
set(LIBEXEC_DEBUG_SUFFIX "")
|
||||
configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_release.conf" @ONLY) # For vcpkg-qmake
|
||||
set(BACKUP_CURRENT_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}")
|
||||
set(BACKUP_CURRENT_HOST_INSTALLED_DIR "${CURRENT_HOST_INSTALLED_DIR}")
|
||||
set(CURRENT_INSTALLED_DIR "./../../../")
|
||||
set(CURRENT_HOST_INSTALLED_DIR "${CURRENT_INSTALLED_DIR}${installed_to_host}")
|
||||
|
||||
## Configure installed qt.conf
|
||||
set(REL_HOST_TO_DATA "${host_to_installed}")
|
||||
configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.conf")
|
||||
set(REL_PATH debug/)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(LIBEXEC_DEBUG_SUFFIX "/debug")
|
||||
endif()
|
||||
configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qt.debug.conf")
|
||||
|
||||
set(CURRENT_INSTALLED_DIR "${BACKUP_CURRENT_INSTALLED_DIR}")
|
||||
set(CURRENT_HOST_INSTALLED_DIR "${BACKUP_CURRENT_HOST_INSTALLED_DIR}")
|
||||
set(REL_HOST_TO_DATA "\${CURRENT_INSTALLED_DIR}/")
|
||||
configure_file("${_file}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/qt_debug.conf" @ONLY) # For vcpkg-qmake
|
||||
|
||||
# target_qt_conf exists iff CMAKE_CROSSCOMPILING
|
||||
# cf. qt_generate_qmake_and_qtpaths_wrapper_for_target in <src>/cmake/QtQmakeHelpers.cmake
|
||||
set(target_qt_conf "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/target_qt.conf")
|
||||
if(EXISTS "${target_qt_conf}")
|
||||
file(READ "${target_qt_conf}" qt_conf_contents)
|
||||
string(REGEX REPLACE "Prefix=[^\n]+" "Prefix=./../../../" qt_conf_contents ${qt_conf_contents})
|
||||
string(REGEX REPLACE "HostData=[^\n]+" "HostData=./../${TARGET_TRIPLET}/share/Qt6" qt_conf_contents ${qt_conf_contents})
|
||||
string(REGEX REPLACE "HostPrefix=[^\n]+" "HostPrefix=./../../../../${_HOST_TRIPLET}" qt_conf_contents ${qt_conf_contents})
|
||||
file(WRITE "${target_qt_conf}" "${qt_conf_contents}")
|
||||
|
||||
if(script_suffix STREQUAL "")
|
||||
foreach(name IN ITEMS qmake qmake6 qtpaths qtpaths6)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${name}" "${CURRENT_HOST_INSTALLED_DIR}/" "\"\$script_dir_path\"/../../../../${HOST_TRIPLET}/")
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
set(target_qt_conf_debug "${CURRENT_PACKAGES_DIR}/tools/Qt6/target_qt_debug.conf")
|
||||
configure_file("${target_qt_conf}" "${target_qt_conf_debug}" COPYONLY)
|
||||
file(READ "${target_qt_conf_debug}" qt_conf_contents)
|
||||
string(REGEX REPLACE "=(bin|lib|Qt6/plugins|Qt6/qml)" "=debug/\\1" qt_conf_contents ${qt_conf_contents})
|
||||
file(WRITE "${target_qt_conf_debug}" "${qt_conf_contents}")
|
||||
|
||||
configure_file("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake${script_suffix}" "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" COPYONLY)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.debug${script_suffix}" "target_qt.conf" "target_qt_debug.conf")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_EMSCRIPTEN)
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6Core/Qt6WasmMacros.cmake" "_qt_test_emscripten_version()" "") # this is missing a include(QtPublicWasmToolchainHelpers)
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
set(_DLL_FILES brotlicommon brotlidec bz2 freetype harfbuzz libpng16)
|
||||
set(DLLS_TO_COPY "")
|
||||
foreach(_file IN LISTS _DLL_FILES)
|
||||
if(EXISTS "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll")
|
||||
list(APPEND DLLS_TO_COPY "${CURRENT_INSTALLED_DIR}/bin/${_file}.dll")
|
||||
endif()
|
||||
endforeach()
|
||||
file(COPY ${DLLS_TO_COPY} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
endif()
|
||||
|
||||
set(hostinfofile "${CURRENT_PACKAGES_DIR}/share/Qt6HostInfo/Qt6HostInfoConfig.cmake")
|
||||
file(READ "${hostinfofile}" _contents)
|
||||
string(REPLACE [[set(QT6_HOST_INFO_LIBEXECDIR "bin")]] [[set(QT6_HOST_INFO_LIBEXECDIR "tools/Qt6/bin")]] _contents "${_contents}")
|
||||
string(REPLACE [[set(QT6_HOST_INFO_BINDIR "bin")]] [[set(QT6_HOST_INFO_BINDIR "tools/Qt6/bin")]] _contents "${_contents}")
|
||||
file(WRITE "${hostinfofile}" "${_contents}")
|
||||
|
||||
if(NOT VCPKG_CROSSCOMPILING OR EXISTS "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsAdditionalTargetInfo.cmake"
|
||||
"CMAKE_CURRENT_LIST_DIR}/../../bin/syncqt"
|
||||
"CMAKE_CURRENT_LIST_DIR}/../../tools/Qt6/bin/syncqt"
|
||||
IGNORE_UNCHANGED)
|
||||
endif()
|
||||
|
||||
set(configfile "${CURRENT_PACKAGES_DIR}/share/Qt6CoreTools/Qt6CoreToolsTargets-debug.cmake")
|
||||
if(EXISTS "${configfile}")
|
||||
file(READ "${configfile}" _contents)
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qmake.exe")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qmake.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qmake.debug.bat"]] _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/qtpaths.exe")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/qtpaths.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/qtpaths.debug.bat"]] _contents "${_contents}")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/windeployqt.exe")
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/windeployqt.debug.bat" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
string(REPLACE [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.exe"]] [[ "${_IMPORT_PREFIX}/tools/Qt6/bin/windeployqt.debug.bat"]] _contents "${_contents}")
|
||||
endif()
|
||||
file(WRITE "${configfile}" "${_contents}")
|
||||
endif()
|
||||
|
||||
if(VCPKG_CROSSCOMPILING)
|
||||
set(dep_file "${CURRENT_PACKAGES_DIR}/share/Qt6/Qt6Dependencies.cmake")
|
||||
file(READ "${dep_file}" dep_contents)
|
||||
string(REPLACE "${CURRENT_HOST_INSTALLED_DIR}" "\${CMAKE_CURRENT_LIST_DIR}/../../../${HOST_TRIPLET}" dep_contents "${dep_contents}")
|
||||
string(REPLACE
|
||||
" set(__qt_platform_requires_host_info_package FALSE)"
|
||||
" set(__qt_platform_requires_host_info_package TRUE)"
|
||||
dep_contents "${dep_contents}")
|
||||
file(WRITE "${dep_file}" "${dep_contents}")
|
||||
endif()
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/Qt6/Qt6Config.cmake" "{Qt6HostInfo_DIR}/.." "{Qt6HostInfo_DIR}/../..")
|
||||
|
||||
function(remove_original_cmake_path file)
|
||||
file(READ "${file}" _contents)
|
||||
string(REGEX REPLACE "original_cmake_path=[^\n]*" "original_cmake_path=''" _contents "${_contents}")
|
||||
file(WRITE "${file}" "${_contents}")
|
||||
endfunction()
|
||||
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS AND NOT CMAKE_HOST_WIN32)
|
||||
foreach(file "qt-cmake${script_suffix}" "qt-cmake-private${script_suffix}")
|
||||
remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/${file}")
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
remove_original_cmake_path("${CURRENT_PACKAGES_DIR}/tools/Qt6/bin/debug/${file}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
# dlls owned but not automatically installed by qtbase
|
||||
# this is required to avoid ownership troubles in downstream qt modules
|
||||
set(qtbase_owned_dlls
|
||||
double-conversion.dll
|
||||
md4c.dll
|
||||
libcrypto-3-${VCPKG_TARGET_ARCHITECTURE}.dll
|
||||
libcrypto-3.dll # for x86
|
||||
pcre2-16.dll
|
||||
z.dll
|
||||
zlib1.dll
|
||||
zstd.dll
|
||||
)
|
||||
# Dynamically find ICU DLLs (the version number tracks the ICU dependency, e.g. icudt78.dll for ICU 78)
|
||||
file(GLOB _qt_icu_dt_dlls "${CURRENT_INSTALLED_DIR}/bin/icudt*.dll")
|
||||
foreach(_icu_dll IN LISTS _qt_icu_dt_dlls)
|
||||
get_filename_component(_icu_name "${_icu_dll}" NAME)
|
||||
string(REGEX REPLACE "^icudt([0-9]+)\\.dll$" "\\1" _icu_ver "${_icu_name}")
|
||||
list(APPEND qtbase_owned_dlls "icudt${_icu_ver}.dll" "icuin${_icu_ver}.dll" "icuuc${_icu_ver}.dll")
|
||||
endforeach()
|
||||
if("dbus" IN_LIST FEATURES)
|
||||
list(APPEND qtbase_owned_dlls dbus-1-3.dll)
|
||||
endif()
|
||||
list(TRANSFORM qtbase_owned_dlls PREPEND "${CURRENT_INSTALLED_DIR}/bin/")
|
||||
foreach(dll IN LISTS qtbase_owned_dlls)
|
||||
if(NOT EXISTS "${dll}") # Need to remove non-existant dlls since dependencies could have been build statically
|
||||
list(REMOVE_ITEM qtbase_owned_dlls "${dll}")
|
||||
endif()
|
||||
endforeach()
|
||||
file(COPY ${qtbase_owned_dlls} DESTINATION "${CURRENT_PACKAGES_DIR}/tools/Qt6/bin")
|
||||
endif()
|
||||
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"%0\..\qmake.exe" -qtconf "%0\..\qt.debug.conf" %*
|
||||
@@ -0,0 +1,31 @@
|
||||
[DevicePaths]
|
||||
Prefix=${CURRENT_INSTALLED_DIR}
|
||||
Headers=include/@QT6_DIRECTORY_PREFIX@
|
||||
Libraries=@REL_PATH@lib
|
||||
Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins
|
||||
Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml
|
||||
Documentation=doc/@QT6_DIRECTORY_PREFIX@
|
||||
Binaries=@REL_PATH@bin
|
||||
LibraryExecutables=tools/Qt6/bin@LIBEXEC_DEBUG_SUFFIX@
|
||||
ArchData=share/Qt6
|
||||
Data=share/Qt6
|
||||
Translations=translations/@QT6_DIRECTORY_PREFIX@
|
||||
Examples=share/examples/@QT6_DIRECTORY_PREFIX@
|
||||
[Paths]
|
||||
Prefix=${CURRENT_INSTALLED_DIR}
|
||||
Headers=include/@QT6_DIRECTORY_PREFIX@
|
||||
Libraries=@REL_PATH@lib
|
||||
Plugins=@REL_PATH@@QT6_DIRECTORY_PREFIX@plugins
|
||||
Qml2Imports=@REL_PATH@@QT6_DIRECTORY_PREFIX@qml
|
||||
Documentation=doc/@QT6_DIRECTORY_PREFIX@
|
||||
Binaries=@REL_PATH@bin
|
||||
LibraryExecutables=tools/Qt6/bin@LIBEXEC_DEBUG_SUFFIX@
|
||||
ArchData=share/Qt6
|
||||
Data=share/Qt6
|
||||
Translations=translations/@QT6_DIRECTORY_PREFIX@
|
||||
Examples=share/examples/@QT6_DIRECTORY_PREFIX@
|
||||
HostPrefix=${CURRENT_HOST_INSTALLED_DIR}
|
||||
HostData=@REL_HOST_TO_DATA@share/Qt6
|
||||
HostBinaries=@REL_PATH@bin
|
||||
HostLibraries=@REL_PATH@lib
|
||||
HostLibraryExecutables=tools/Qt6/bin
|
||||
@@ -0,0 +1,2 @@
|
||||
@echo off
|
||||
"%~dp0qtpaths.exe" --qtconf "%~dp0qt.debug.conf" %*
|
||||
@@ -0,0 +1,24 @@
|
||||
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
|
||||
index 5e6e966c..d6326a0f 100644
|
||||
--- a/src/corelib/configure.cmake
|
||||
+++ b/src/corelib/configure.cmake
|
||||
@@ -591,6 +591,7 @@ qt_config_compile_test(cpp_winrt
|
||||
runtimeobject
|
||||
CODE
|
||||
"// Including winrt/base.h causes an error in some configurations (Windows 10 SDK + c++20)
|
||||
+#define _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS
|
||||
# include <guiddef.h> // required by clang-cl: https://github.com/microsoft/cppwinrt/issues/1179
|
||||
# include <winrt/base.h>
|
||||
|
||||
diff --git a/src/corelib/platform/windows/qt_winrtbase_p.h b/src/corelib/platform/windows/qt_winrtbase_p.h
|
||||
index 69a602a5..557c3ebb 100644
|
||||
--- a/src/corelib/platform/windows/qt_winrtbase_p.h
|
||||
+++ b/src/corelib/platform/windows/qt_winrtbase_p.h
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#if QT_CONFIG(cpp_winrt)
|
||||
+#define _SILENCE_EXPERIMENTAL_COROUTINE_DEPRECATION_WARNINGS
|
||||
# include <guiddef.h> // required by clang-cl: https://github.com/microsoft/cppwinrt/issues/1179
|
||||
# include <winrt/base.h>
|
||||
# include <QtCore/private/qfactorycacheregistration_p.h>
|
||||
@@ -0,0 +1,31 @@
|
||||
src/corelib/mimetypes/mimetypes_resources.cmake | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/corelib/mimetypes/mimetypes_resources.cmake b/src/corelib/mimetypes/mimetypes_resources.cmake
|
||||
index 1bec50e4..d4d54763 100644
|
||||
--- a/src/corelib/mimetypes/mimetypes_resources.cmake
|
||||
+++ b/src/corelib/mimetypes/mimetypes_resources.cmake
|
||||
@@ -7,17 +7,17 @@
|
||||
# file with the same information
|
||||
|
||||
set(corelib_mimetypes_resource_file
|
||||
- "${CMAKE_CURRENT_LIST_DIR}/3rdparty/tika-mimetypes.xml"
|
||||
+ "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/share/mime/packages/freedesktop.org.xml"
|
||||
)
|
||||
|
||||
function(corelib_add_mimetypes_resources target)
|
||||
set(source_file "${corelib_mimetypes_resource_file}")
|
||||
set_source_files_properties("${source_file}"
|
||||
- PROPERTIES QT_RESOURCE_ALIAS "tika-mimetypes.xml"
|
||||
+ PROPERTIES QT_RESOURCE_ALIAS "freedesktop.org.xml"
|
||||
)
|
||||
qt_internal_add_resource(${target} "mimetypes"
|
||||
PREFIX
|
||||
- "/qt-project.org/qmime/tika/packages"
|
||||
+ "/qt-project.org/qmime/packages"
|
||||
FILES
|
||||
"${source_file}"
|
||||
)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/corelib/io/qfilesystemwatcher.cpp b/src/corelib/io/qfilesystemwatcher.cpp
|
||||
index cd72f21a..2fba878f 100644
|
||||
--- a/src/corelib/io/qfilesystemwatcher.cpp
|
||||
+++ b/src/corelib/io/qfilesystemwatcher.cpp
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <qloggingcategory.h>
|
||||
#include <qset.h>
|
||||
|
||||
-#if (defined(Q_OS_LINUX) || defined(Q_OS_QNX)) && QT_CONFIG(inotify)
|
||||
+#if (defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD)) && QT_CONFIG(inotify)
|
||||
#define USE_INOTIFY
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,729 @@
|
||||
{
|
||||
"name": "qtbase",
|
||||
"version": "6.11.2",
|
||||
"description": "Qt Base (Core, Gui, Widgets, Network, ...)",
|
||||
"homepage": "https://www.qt.io/",
|
||||
"license": null,
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "libb2",
|
||||
"platform": "!windows"
|
||||
},
|
||||
"md4c",
|
||||
{
|
||||
"name": "pcre2",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"host": true,
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"doubleconversion"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"cups",
|
||||
"thread"
|
||||
],
|
||||
"platform": "osx"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"concurrent",
|
||||
"thread"
|
||||
],
|
||||
"platform": "android"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"pcre2"
|
||||
],
|
||||
"platform": "windows & static"
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"default-features": [
|
||||
{
|
||||
"name": "appstore-compliant",
|
||||
"platform": "uwp"
|
||||
},
|
||||
"async-io",
|
||||
"brotli",
|
||||
"concurrent",
|
||||
{
|
||||
"name": "dbus",
|
||||
"platform": "!(static & windows) & !android"
|
||||
},
|
||||
"dnslookup",
|
||||
"doubleconversion",
|
||||
{
|
||||
"name": "egl",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "egl",
|
||||
"platform": "android"
|
||||
},
|
||||
{
|
||||
"name": "fontconfig",
|
||||
"platform": "linux"
|
||||
},
|
||||
"freetype",
|
||||
{
|
||||
"name": "gles2",
|
||||
"platform": "android"
|
||||
},
|
||||
"gui",
|
||||
"harfbuzz",
|
||||
"icu",
|
||||
"jpeg",
|
||||
"network",
|
||||
{
|
||||
"name": "opengl",
|
||||
"platform": "!ios"
|
||||
},
|
||||
{
|
||||
"name": "openssl",
|
||||
"platform": "!ios"
|
||||
},
|
||||
"pcre2",
|
||||
"png",
|
||||
{
|
||||
"name": "securetransport",
|
||||
"platform": "ios"
|
||||
},
|
||||
"sessionmanager",
|
||||
"sql",
|
||||
"sql-psql",
|
||||
"sql-sqlite",
|
||||
"testlib",
|
||||
"thread",
|
||||
"widgets",
|
||||
{
|
||||
"name": "windeployqt",
|
||||
"platform": "windows"
|
||||
},
|
||||
{
|
||||
"name": "xcb",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "xcb-sm",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "xcb-xlib",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "xrender",
|
||||
"platform": "linux"
|
||||
},
|
||||
"zstd"
|
||||
],
|
||||
"features": {
|
||||
"appstore-compliant": {
|
||||
"description": "Disable code that is not allowed in platform app stores. This is on by default for platforms which require distribution through an app store by default, in particular Android, iOS, tvOS, and watchOS."
|
||||
},
|
||||
"async-io": {
|
||||
"description": "Provides support for asynchronous file I/O",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"future",
|
||||
"thread"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"brotli": {
|
||||
"description": "Support for downloading and decompressing resources compressed with Brotli through QNetworkAccessManager.",
|
||||
"dependencies": [
|
||||
"brotli",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"network"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"concurrent": {
|
||||
"description": "Provides a high-level multi-threading API. Qt Concurrent",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"future"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"cups": {
|
||||
"description": "Provides support for the Common Unix Printing System.",
|
||||
"supports": "linux | osx",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"widgets"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dbus": {
|
||||
"description": "Qt D-Bus",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "dbus",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"host": true,
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"dbus"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"thread"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"dnslookup": {
|
||||
"description": "Enable DNS lookup support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"network",
|
||||
"thread"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"doubleconversion": {
|
||||
"description": "Enable double conversion support",
|
||||
"dependencies": [
|
||||
"double-conversion"
|
||||
]
|
||||
},
|
||||
"egl": {
|
||||
"description": "EGL",
|
||||
"supports": "android | linux",
|
||||
"dependencies": [
|
||||
"egl",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"opengl"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"fontconfig": {
|
||||
"description": "Use fontconfig",
|
||||
"supports": "!osx & !windows",
|
||||
"dependencies": [
|
||||
"fontconfig",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"freetype",
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"framework": {
|
||||
"description": "MAC framework build",
|
||||
"supports": "osx & !static"
|
||||
},
|
||||
"freetype": {
|
||||
"description": "Supports the FreeType 2 font engine (and its supported font formats).",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "freetype",
|
||||
"default-features": false
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"future": {
|
||||
"description": "Qt Future (QFuture) support"
|
||||
},
|
||||
"gles2": {
|
||||
"description": "OpenGL ES 2.0",
|
||||
"supports": "!windows & !osx",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gles3": {
|
||||
"description": "OpenGL ES 3.0",
|
||||
"supports": "!windows & !osx",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gles2"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"glib": {
|
||||
"description": "GLib",
|
||||
"dependencies": [
|
||||
"glib"
|
||||
]
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "GTK3 platform theme plugin",
|
||||
"supports": "linux",
|
||||
"dependencies": [
|
||||
"gtk3",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"glib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gui": {
|
||||
"description": "Qt Gui",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "opengl",
|
||||
"platform": "!ios"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"opengl"
|
||||
],
|
||||
"platform": "osx"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"egl",
|
||||
"freetype",
|
||||
"gles2",
|
||||
"opengl"
|
||||
],
|
||||
"platform": "android"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"thread"
|
||||
],
|
||||
"platform": "windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"harfbuzz": {
|
||||
"description": "Use harfbuzz",
|
||||
"dependencies": [
|
||||
"harfbuzz",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"icu": {
|
||||
"description": "Enable ICU support",
|
||||
"dependencies": [
|
||||
"icu"
|
||||
]
|
||||
},
|
||||
"ioring": {
|
||||
"description": "qioring for async-io",
|
||||
"supports": "linux | (windows & !x86)",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "liburing",
|
||||
"platform": "linux"
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"async-io"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"jpeg": {
|
||||
"description": "Enable JPEG",
|
||||
"dependencies": [
|
||||
"libjpeg-turbo",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"network": {
|
||||
"description": "Qt Network"
|
||||
},
|
||||
"opengl": {
|
||||
"description": "OpenGL",
|
||||
"dependencies": [
|
||||
"opengl",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"openssl": {
|
||||
"description": "Enable OpenSSL",
|
||||
"dependencies": [
|
||||
"openssl",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"network"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"pcre2": {
|
||||
"description": "Enable PCRE2 support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "pcre2",
|
||||
"default-features": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"png": {
|
||||
"description": "Enable PNG",
|
||||
"dependencies": [
|
||||
"libpng",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"securetransport": {
|
||||
"description": "Enable Secure Transport",
|
||||
"supports": "ios | osx"
|
||||
},
|
||||
"sessionmanager": {
|
||||
"description": "Sessionmanager",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"shared-mime-info": {
|
||||
"description": "Use GPL licensed shared-mime-info port from freedesktop.org",
|
||||
"dependencies": [
|
||||
"shared-mime-info"
|
||||
]
|
||||
},
|
||||
"sql": {
|
||||
"description": "Qt Sql",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"concurrent"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sql-mysql": {
|
||||
"description": "Enable SQL Driver MySQL",
|
||||
"dependencies": [
|
||||
"libmysql",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sql"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sql-oci": {
|
||||
"description": "Enable SQL Driver Oracle OCI",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sql"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sql-odbc": {
|
||||
"description": "Enable SQL Driver odbc",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sql"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "unixodbc",
|
||||
"platform": "!windows"
|
||||
}
|
||||
]
|
||||
},
|
||||
"sql-psql": {
|
||||
"description": "Enable SQL Driver psql",
|
||||
"dependencies": [
|
||||
"libpq",
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sql"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"sql-sqlite": {
|
||||
"description": "Enable SQL Driver sqlite",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sql"
|
||||
]
|
||||
},
|
||||
"sqlite3"
|
||||
]
|
||||
},
|
||||
"testlib": {
|
||||
"description": "Qt Testlib"
|
||||
},
|
||||
"thread": {
|
||||
"description": "Thread support; provides QThread and related classes."
|
||||
},
|
||||
"vulkan": {
|
||||
"description": "Enable Vulkan support",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
},
|
||||
"vulkan"
|
||||
]
|
||||
},
|
||||
"wayland": {
|
||||
"description": "Enable Wayland platform plugin",
|
||||
"supports": "linux | osx",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"widgets": {
|
||||
"description": "Qt Widgets",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"windeployqt": {
|
||||
"description": "Qt Windows Deployment Tool",
|
||||
"supports": "windows",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"network"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "qtbase",
|
||||
"host": true,
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"windeployqt"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xcb": {
|
||||
"description": "XCB",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"thread",
|
||||
"xkbcommon-x11",
|
||||
"xlib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xcb-sm": {
|
||||
"description": "xcb-sm",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"sessionmanager",
|
||||
"xcb"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xcb-xlib": {
|
||||
"description": "xcb-xlib",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"xlib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xkb": {
|
||||
"description": "XKB"
|
||||
},
|
||||
"xkbcommon-x11": {
|
||||
"description": "xkbcommon_x11",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"xkb"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xlib": {
|
||||
"description": "XLib",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"gui"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"xrender": {
|
||||
"description": "XRender for native painting",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "qtbase",
|
||||
"default-features": false,
|
||||
"features": [
|
||||
"fontconfig",
|
||||
"xcb-xlib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"zstd": {
|
||||
"description": "Zstandard support",
|
||||
"dependencies": [
|
||||
"zstd"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
Locate the debug Qt WebEngine resources under the vcpkg debug tree.
|
||||
|
||||
In the vcpkg layout the qtwebengine port moves the release WebEngine resources
|
||||
into share/Qt6/resources (== QT_INSTALL_DATA/resources), but keeps the debug
|
||||
".debug.pak" resources under <prefix>/debug/resources. QT_INSTALL_DATA is shared
|
||||
between the debug and release configurations, so windeployqt looked for the debug
|
||||
resources in share/Qt6/resources and failed with e.g.
|
||||
"...\share\Qt6\resources\qtwebengine_resources.debug.pak does not exist."
|
||||
|
||||
Resolve the resources from QT_INSTALL_PREFIX/debug for a debug deployment; the
|
||||
release path is unchanged. Paired with the LibraryExecutables fix in qt.conf.in
|
||||
(which points QT_INSTALL_LIBEXECS at tools/Qt6/bin/debug for the debug config),
|
||||
this lets windeployqt deploy Qt WebEngine for debug builds without relocating any
|
||||
debug binaries into the non-debug tree.
|
||||
|
||||
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp
|
||||
index 839a0b4..bd0590e 100644
|
||||
--- a/src/tools/windeployqt/main.cpp
|
||||
+++ b/src/tools/windeployqt/main.cpp
|
||||
@@ -1955,8 +1955,13 @@ static bool deployWebEngineCore(const QMap<QString, QString> &qtpathsVariables,
|
||||
if (!deployWebProcess(qtpathsVariables, webEngineProcessName, pluginInfo, options, errorMessage))
|
||||
return false;
|
||||
const QString resourcesSubDir = QStringLiteral("/resources");
|
||||
- const QString resourcesSourceDir = qtpathsVariables.value(QStringLiteral("QT_INSTALL_DATA"))
|
||||
- + resourcesSubDir + u'/';
|
||||
+ // vcpkg keeps the debug Qt WebEngine resources (.debug.pak) under <prefix>/debug/resources,
|
||||
+ // separate from the release resources in QT_INSTALL_DATA/resources. QT_INSTALL_DATA is shared
|
||||
+ // between debug and release, so resolve the debug resources from the prefix instead.
|
||||
+ const QString resourcesBaseDir = isDebug
|
||||
+ ? qtpathsVariables.value(QStringLiteral("QT_INSTALL_PREFIX")) + QStringLiteral("/debug")
|
||||
+ : qtpathsVariables.value(QStringLiteral("QT_INSTALL_DATA"));
|
||||
+ const QString resourcesSourceDir = resourcesBaseDir + resourcesSubDir + u'/';
|
||||
const QString resourcesTargetDir(options.directory + resourcesSubDir);
|
||||
if (!createDirectory(resourcesTargetDir, errorMessage, options.dryRun))
|
||||
return false;
|
||||
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
set mypath=%~dp0
|
||||
set mypath=%mypath:~0,-1%
|
||||
set BAKCD=!CD!
|
||||
cd /D "%mypath%\..\..\..\debug\bin"
|
||||
set PATH=!CD!;%PATH%
|
||||
cd /D "%BAKCD%"
|
||||
"%mypath%\windeployqt6.exe" --qtpaths "%mypath%\qtpaths.debug.bat" %*
|
||||
endlocal
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"default": {
|
||||
"gtk": {
|
||||
"baseline": "4.24.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"qtbase": {
|
||||
"baseline": "6.11.2",
|
||||
"port-version": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "4.24.1",
|
||||
"port-version": 0,
|
||||
"path": "$/ports/gtk"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "6.11.2",
|
||||
"port-version": 0,
|
||||
"path": "$/ports/qtbase"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# Shared by the aphrody triplets (x64-windows-static-md, x64-linux-musl, x64-linux).
|
||||
# APHRODY_STORE reaches port builds without entering the package ABI hash.
|
||||
list(APPEND VCPKG_ENV_PASSTHROUGH_UNTRACKED APHRODY_STORE)
|
||||
@@ -0,0 +1,9 @@
|
||||
# Alpine (musl), built natively on Alpine with VCPKG_FORCE_SYSTEM_BINARIES=1.
|
||||
set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
set(VCPKG_FIXUP_ELF_RPATH ON)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../scripts/aphrody/triplet-common.cmake")
|
||||
@@ -4,3 +4,4 @@ set(VCPKG_LIBRARY_LINKAGE static)
|
||||
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME Linux)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../scripts/aphrody/triplet-common.cmake")
|
||||
@@ -2,3 +2,5 @@ set(VCPKG_TARGET_ARCHITECTURE x64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_PROVIDED_FORTRAN ON)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../scripts/aphrody/triplet-common.cmake")
|
||||
Reference in new issue
Block a user