--- a/qtbase/configure.json
+++ b/qtbase/configure.json
@@ -168,7 +168,8 @@
             "sources": [
                 { "libs": "-lzdll", "condition": "config.msvc" },
                 { "libs": "-lzlib", "condition": "config.msvc" },
-                { "libs": "-lz", "condition": "!config.msvc" },
+                { "libs": "-lz", "condition": "!config.msvc && features.shared" },
+                { "libs": "-l:libz.a", "condition": "!features.shared" },
                 { "libs": "-s USE_ZLIB=1", "condition": "config.wasm" }
             ]
         },
@@ -183,7 +184,8 @@
                 ]
             },
             "sources": [
-                { "type": "pkgConfig", "args": "libzstd >= 1.3" },
+                { "type": "pkgConfig", "args": "libzstd >= 1.3", "condition": "features.shared" },
+                { "libs": "-l:libzstd.a", "condition": "!features.shared" },
                 "-lzstd"
             ]
         },
--- a/qtbase/src/corelib/configure.json
+++ b/qtbase/src/corelib/configure.json
@@ -111,9 +111,10 @@
                         "debug": "-lsicuind -lsicuucd -lsicudtd",
                         "release": "-lsicuin -lsicuuc -lsicudt"
                     },
-                    "condition": "config.win32 && !features.shared"
+                    "condition": "config.msvc && !features.shared"
                 },
                 { "libs": "-licuin -licuuc -licudt", "condition": "config.win32 && features.shared" },
+                { "libs": "-licuin -licuuc -licudt -lpthread", "condition": "config.win32 && !features.shared" },
                 { "libs": "-licui18n -licuuc -licudata", "condition": "!config.win32" }
             ],
             "use": [
@@ -193,7 +194,7 @@
             },
             "headers": "pcre2.h",
             "sources": [
-                { "type": "pkgConfig", "args": "libpcre2-16" },
+                { "type": "pkgConfig", "args": "libpcre2-16", "condition": "features.shared" },
                 "-lpcre2-16"
             ]
         },
--- a/qtbase/src/gui/configure.json
+++ b/qtbase/src/gui/configure.json
@@ -238,7 +238,8 @@
             },
             "headers": "ft2build.h",
             "sources": [
-                { "type": "pkgConfig", "args": "freetype2" },
+                { "type": "pkgConfig", "args": "freetype2", "condition": "features.shared" },
+                { "type": "freetype", "libs": "-lfreetype -lbz2", "condition": "!features.shared" },
                 { "type": "freetype", "libs": "-lfreetype", "condition": "!config.wasm" },
                 { "libs": "-s USE_FREETYPE=1", "condition": "config.wasm" },
                 { "libs": "-lfreetype" }
@@ -303,6 +304,7 @@
             },
             "headers": "harfbuzz/hb.h",
             "sources": [
+                { "type": "pkgConfig", "args": "--static --libs harfbuzz", "condition": "!features.shared" },
                 "-lharfbuzz"
             ]
         },
@@ -373,7 +375,7 @@
             },
             "headers": "jpeglib.h",
             "sources": [
-                { "type": "pkgConfig", "args": "libjpeg" },
+                { "type": "pkgConfig", "args": "libjpeg", "condition": "features.shared" },
                 { "libs": "-llibjpeg", "condition": "config.msvc" },
                 "-ljpeg"
             ]
@@ -396,10 +398,10 @@
             },
             "headers": "png.h",
             "sources": [
-                { "type": "pkgConfig", "args": "libpng" },
+                { "type": "pkgConfig", "args": "libpng", "condition": "features.shared" },
                 { "libs": "-llibpng16", "condition": "config.msvc" },
                 { "libs": "-llibpng", "condition": "config.msvc" },
-                { "libs": "-lpng16", "condition": "!config.msvc" },
+                { "libs": "-lpng16 -lz", "condition": "!config.msvc" },
                 { "libs": "-lpng", "condition": "!config.msvc" },
                 { "libs": "-s USE_LIBPNG=1", "condition": "config.wasm" }
             ],
--- a/qtbase/src/network/configure.json
+++ b/qtbase/src/network/configure.json
@@ -85,6 +85,9 @@
             },
             "sources": [
                 { "type": "openssl" },
+                { "type": "pkgConfig", "args": "--static --libs libssl",
+                    "condition": "config.win32 && !features.shared"
+                },
                 {
                     "libs": "-lssleay32 -llibeay32 -lUser32 -lWs2_32 -lAdvapi32 -lGdi32",
                     "condition": "config.win32"
--- a/qtbase/src/plugins/sqldrivers/configure.json
+++ b/qtbase/src/plugins/sqldrivers/configure.json
@@ -148,7 +150,8 @@
             },
             "headers": "sqlite3.h",
             "sources": [
-                { "type": "pkgConfig", "args": "sqlite3" },
+                { "type": "pkgConfig", "args": "sqlite3", "condition": "features.shared" },
+                { "type": "pkgConfig", "args": "--static --libs sqlite3", "condition": "!features.shared" },
                 "-lsqlite3"
             ],
             "use": [
