diff --git a/src/entrypoint/entrypoint_implementation.pro b/src/entrypoint/entrypoint_implementation.pro index 900e143336..3866163220 100644 --- a/src/entrypoint/entrypoint_implementation.pro +++ b/src/entrypoint/entrypoint_implementation.pro @@ -22,12 +22,6 @@ win32 { } mingw { DEFINES += QT_NEEDS_QMAIN - MODULE_DEFINES += QT_NEEDS_QMAIN - - # This library needs to come before the entry-point library in the - # linker line, so that the static linker will pick up the WinMain - # symbol from the entry-point library. - MODULE_LDFLAGS += -lmingw32 } } @@ -36,21 +30,6 @@ win32 { load(qt_build_paths) load(qt_common) -!build_pass { - MODULE_PRI_CONTENT = \ - "QT.entrypoint_implementation.name = QtEntryPointImplementation" \ - "QT.entrypoint_implementation.module = Qt6EntryPoint" \ - "QT.entrypoint_implementation.ldflags = $$MODULE_LDFLAGS" \ - "QT.entrypoint_implementation.libs = \$\$QT_MODULE_LIB_BASE" \ - "QT.entrypoint_implementation.DEFINES = $$MODULE_DEFINES" \ - "QT.entrypoint_implementation.module_config = staticlib v2 internal_module" - - module_path = $$MODULE_QMAKE_OUTDIR/mkspecs/modules - force_independent|split_incpath: module_path = "$${module_path}-inst" - MODULE_PRI = $$module_path/qt_lib_entrypoint_private.pri - write_file($$MODULE_PRI, MODULE_PRI_CONTENT, append)|error() -} - qtConfig(debug_and_release): CONFIG += debug_and_release qtConfig(build_all): CONFIG += build_all diff --git a/src/entrypoint/entrypoint_module.pro b/src/entrypoint/entrypoint_module.pro index aac4ac6c07..9d3188c69a 100644 --- a/src/entrypoint/entrypoint_module.pro +++ b/src/entrypoint/entrypoint_module.pro @@ -7,4 +7,19 @@ CONFIG += header_module no_module_headers internal_module MODULE_DEPENDS = entrypoint_implementation QT = +mingw { + MODULE_DEFINES += QT_NEEDS_QMAIN + + # This library needs to come before the entry-point library in the + # linker line, so that the static linker will pick up the WinMain + # symbol from the entry-point library. + MODULE_LDFLAGS += -lmingw32 +} + +MODULE_PRI_EXTRA_CONTENT = \ + "QT.entrypoint_implementation.name = QtEntryPointImplementation" \ + "QT.entrypoint_implementation.module = Qt6EntryPoint" \ + "QT.entrypoint_implementation.libs = \$\$QT_MODULE_LIB_BASE" \ + "QT.entrypoint_implementation.module_config = staticlib v2 internal_module" + load(qt_module)