forked from qt-creator/qt-creator
Support out of source support libraries
It was not possible to use QTC_LIB_DEPENDS if the library is not in the Qt Creator source tree. Provide a QTC_LIB_DIRS variable, similar to QTC_PLUGIN_DIRS. Task-number: QTCREATORBUG-20382 Change-Id: I9120d221b6567f699881c0ad00d1f1e49ef3b920 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This commit is contained in:
@@ -193,6 +193,13 @@ for(dir, QTC_PLUGIN_DIRS) {
|
|||||||
INCLUDEPATH += $$dir
|
INCLUDEPATH += $$dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTC_LIB_DIRS_FROM_ENVIRONMENT = $$(QTC_LIB_DIRS)
|
||||||
|
QTC_LIB_DIRS += $$split(QTC_LIB_DIRS_FROM_ENVIRONMENT, $$QMAKE_DIRLIST_SEP)
|
||||||
|
QTC_LIB_DIRS += $$IDE_SOURCE_TREE/src/libs
|
||||||
|
for(dir, QTC_LIB_DIRS) {
|
||||||
|
INCLUDEPATH += $$dir
|
||||||
|
}
|
||||||
|
|
||||||
CONFIG += \
|
CONFIG += \
|
||||||
depend_includepath \
|
depend_includepath \
|
||||||
no_include_pwd
|
no_include_pwd
|
||||||
@@ -276,7 +283,16 @@ for(ever) {
|
|||||||
break()
|
break()
|
||||||
done_libs += $$QTC_LIB_DEPENDS
|
done_libs += $$QTC_LIB_DEPENDS
|
||||||
for(dep, QTC_LIB_DEPENDS) {
|
for(dep, QTC_LIB_DEPENDS) {
|
||||||
include($$PWD/src/libs/$$dep/$${dep}_dependencies.pri)
|
dependencies_file =
|
||||||
|
for(dir, QTC_LIB_DIRS) {
|
||||||
|
exists($$dir/$$dep/$${dep}_dependencies.pri) {
|
||||||
|
dependencies_file = $$dir/$$dep/$${dep}_dependencies.pri
|
||||||
|
break()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
isEmpty(dependencies_file): \
|
||||||
|
error("Library dependency $$dep not found")
|
||||||
|
include($$dependencies_file)
|
||||||
LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
|
LIBS += -l$$qtLibraryName($$QTC_LIB_NAME)
|
||||||
}
|
}
|
||||||
QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
|
QTC_LIB_DEPENDS = $$unique(QTC_LIB_DEPENDS)
|
||||||
|
Reference in New Issue
Block a user