Skip to content

Commit

Permalink
qt6-static: Dirty hack to use always pkgconfig static targets for mod…
Browse files Browse the repository at this point in the history
…ules
  • Loading branch information
Alexpux committed Feb 21, 2024
1 parent 5c641e4 commit c278e2c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,3 @@ index 51fa960c5b..8ccb7dc9c4 100644

get_target_property(target_type ${target} TYPE)
if(target_type STREQUAL "STATIC_LIBRARY")

Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@

# set QT_SUPERBUILD early, so that qtbase/.cmake.conf can check it
set(QT_SUPERBUILD TRUE)
+
+find_package(PkgConfig QUIET)
+list(APPEND PKG_CONFIG_EXECUTABLE "--static")

# Include qtbase's .cmake.conf for access to QT_REPO_MODULE_VERSION
set(__qt6_qtbase_src_path "${CMAKE_CURRENT_SOURCE_DIR}/qtbase")
diff --git a/qtimageformats/src/imageformats/configure.cmake b/qtimageformats/src/imageformats/configure.cmake
index 1111111..2222222 100644
--- a/qtimageformats/src/imageformats/configure.cmake
Expand All @@ -15,15 +29,14 @@ diff --git a/qtimageformats/cmake/FindLibMng.cmake b/qtimageformats/cmake/FindLi
index 1111111..2222222 100644
--- a/qtimageformats/cmake/FindLibMng.cmake
+++ b/qtimageformats/cmake/FindLibMng.cmake
@@ -9,7 +9,7 @@
@@ -7,6 +7,7 @@
endif()

find_package(PkgConfig QUIET)
+#list(APPEND PKG_CONFIG_EXECUTABLE "--static")

if(PkgConfig_FOUND)
- pkg_check_modules(Libmng IMPORTED_TARGET libmng)
+ pkg_check_modules(Libmng IMPORTED_TARGET libmng-static)

if(TARGET PkgConfig::Libmng)
add_library(Libmng::Libmng INTERFACE IMPORTED)
pkg_check_modules(Libmng IMPORTED_TARGET libmng)
diff --git a/qtimageformats/cmake/FindWrapWebP.cmake b/qtimageformats/cmake/FindWrapWebP.cmake
index 1111111..2222222 100644
--- a/qtimageformats/cmake/FindWrapWebP.cmake
Expand Down
6 changes: 3 additions & 3 deletions mingw-w64-qt6-static/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname}-static
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}-static")
_qtver=6.6.2
pkgver=${_qtver/-/}
pkgrel=2
pkgrel=3
arch=(any)
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
Expand Down Expand Up @@ -61,7 +61,7 @@ source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/sing
015-qt6-windeployqt-fixes.patch)
sha256sums=('3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d'
'26f3bcc3729520a5ba648a9ce92a9293c8fb1cf16d81af612587ce10d501dcb6'
'48bcf7e4d5c6101d653d7bb0c1beae53ddc393d56a756cb3f246848ef0fabcc1'
'817ce7a15eafb945da5f03706cd7196198c9a903c0372cb7023d1e27634355a4'
'af3f4c6491942ee6a7681eecef2d999897e38fcef7a5edcf3774589f137dac73'
'9b64d5a03ba6155d16c8105b8dd4bdc7d687170df8e0d5404b4b10292549bde2'
'554e979085f5deabd9f83637168c79f4929781434164d42dd14a8335a61d3cfc'
Expand All @@ -73,7 +73,7 @@ sha256sums=('3c1e42b3073ade1f7adbf06863c01e2c59521b7cc2349df2f74ecd7ebfcb922d'
'474eb6643ae8139c41e90363c8846c52162cd858d863c195c0431594d351896d'
'39d57493b0edc1317729b88dad6a07b86936072f0fbbd2aae7b01e2211ce29ed'
'ce0023e8b72fe4b5840ca892bd5ad52120b6b484161bf2ffe0b6da9404625641'
'a20db5893693573e4446f8678bf8393e2c0e0cf905ce6c5844b73739eb919b1c'
'1d640ce887bbaaa847b8dd30a1a655f273c9907de06ad9d91580c02215e3e8c8'
'605ad15bc71a7b2d5b1c7a197a44e6251a0098f702f5411bf3e82a4966528132')

# Use the right mkspecs file
Expand Down

0 comments on commit c278e2c

Please sign in to comment.