diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-11-03 17:00:11 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-11-09 18:08:06 +0100 |
commit | ff170962d460aafea93373f8c2391716d199adb9 (patch) | |
tree | 7e2a1fcb81afcd2af359fec56621c2690999c3b4 /mkspecs/features/qt_module.prf | |
parent | c2e1a773e060ae34089f805eaab87394c5903a9e (diff) |
Don't rely on the module.pri for the entrypoint linking to the library
Depending on the presence and behavior of HEADER_MODULE/header_module
in CMake and qmake land, the module.pri might end up with an empty
module line, which means adding the module via QT_PRIVATE += entrypoint
will not link to the static library.
To avoid this problem we write an explicit module entry (QT.foo.bar)
into the same module.pri file as the one generated by qt_module,
where the auto-generated one has header_module enabled, and hence
no link behavior, while the manually written entry has a module
component, and will ensure linkage to the static library.
Change-Id: Ib98484f74410fab45c4d109f3610028200fba0c5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs/features/qt_module.prf')
-rw-r--r-- | mkspecs/features/qt_module.prf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf index 876e5130c6..3cacc8dfde 100644 --- a/mkspecs/features/qt_module.prf +++ b/mkspecs/features/qt_module.prf @@ -57,9 +57,9 @@ ucmodule = $$upper($$MODULE) isEmpty(MODULE_INCNAME): MODULE_INCNAME = $$TARGET internal_module: \ - MODULE_DEPENDS = $$replace(QT, -private$, _private) + MODULE_DEPENDS += $$replace(QT, -private$, _private) else: \ - MODULE_DEPENDS = $$replace(QT, -private$, ) + MODULE_DEPENDS += $$replace(QT, -private$, ) MODULE_DEPENDS = $$unique(MODULE_DEPENDS) contains(MODULE_DEPENDS, $$MODULE): \ error("$$TARGET depends on itself.") |