forked from qt-creator/qt-creator
CMakePM: Handle project FindPackage package variables
For example find_package(ZLIB QUEIT) will result in the package variables ZLIB_LIBRARY ZLIB_INCLUDE_DIR. The variables are available for both code completion and navigation. Change-Id: I4ea6090f44a980dc91632fcabbda16987b0f0285 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -248,6 +248,10 @@ void CMakeEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||
|
||||
// Check if the symbols is a user defined function or macro
|
||||
const CMakeBuildSystem *cbs = static_cast<const CMakeBuildSystem *>(bs);
|
||||
// Strip variable coating
|
||||
if (buffer.startsWith("${") && buffer.endsWith("}"))
|
||||
buffer = buffer.mid(2, buffer.size() - 3);
|
||||
|
||||
if (cbs->cmakeSymbolsHash().contains(buffer)) {
|
||||
link = cbs->cmakeSymbolsHash().value(buffer);
|
||||
addTextStartEndToLink(link);
|
||||
|
||||
Reference in New Issue
Block a user