Skip to content

Commit

Permalink
cmake/QtInstallPaths.cmake - ensure the list is long enough
Browse files Browse the repository at this point in the history
  • Loading branch information
winterz committed Jun 20, 2016
1 parent 2552e87 commit aa6922a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmake/QtInstallPaths.cmake
Expand Up @@ -56,10 +56,11 @@ string(REPLACE "\n" ";" VARS_LIST ${ALL_VARS})
foreach(QVAL ${VARS_LIST})
if(QVAL MATCHES "QT_INSTALL_")
string(REPLACE ":" ";" QVAL_LIST ${QVAL})
list(LENGTH QVAL_LIST listlen)
list(GET QVAL_LIST 0 var)
if(WIN32)
list(GET QVAL_LIST 1 drive)
if(WIN32 AND ${listlen} GREATER 2)
list(GET QVAL_LIST 2 path)
list(GET QVAL_LIST 1 drive)
set(path "${drive}:${path}")
else()
list(GET QVAL_LIST 1 path)
Expand Down

0 comments on commit aa6922a

Please sign in to comment.