diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-09 12:11:55 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-22 07:46:35 +0000 |
commit | 632b1c1345c2ebed6300a3d1d7d2056922a7e1a0 (patch) | |
tree | 26ba55ed755ad3a39139ebcf098e51839ce8867f /mkspecs | |
parent | 59a3abd1f1429eef19e178e880070c3c1d902fba (diff) |
configure: error out on activating conflicting libraries
Change-Id: I5d7dbeb3b3a653f7151279c7eba9387c107f9c42
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/features/qt_configure.prf | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf index 82b97657d9..7744695b93 100644 --- a/mkspecs/features/qt_configure.prf +++ b/mkspecs/features/qt_configure.prf @@ -612,6 +612,9 @@ defineReplace(qtConfLibraryArgs) { defineTest(qtConfExportLibrary) { lpfx = $${currentConfig}.libraries.$$1 + alias = $$eval($${lpfx}.alias) + $${currentConfig}.found.$$alias = $$1 + export($${currentConfig}.found.$$alias) name = $$eval($${lpfx}.export) isEmpty(name): return() spfx = $${lpfx}.sources.$$eval($${lpfx}.source) @@ -658,6 +661,17 @@ defineTest(qtConfHandleLibrary) { lpfx = $${currentConfig}.libraries.$$1 defined($${lpfx}.result, var): return() + alias = $$eval($${lpfx}.alias) + !isEmpty($${currentConfig}.found.$$alias) { + # this happening indicates a logic error in the conditions + # of the feature(s) referring to this library. + # note that this does not look across module boundaries, as + # multiple modules may know the same libraries; de-duplication + # happens via the cache (obviously, this assumes identical + # definitions and logic). + error("A library exporting '$$alias' was already found.") + } + qtConfEnsureTestTypeDeps("library") qtConfTestPrepare_compile($$lpfx) use_args = $$eval($${lpfx}.literal_args) |