I have a QT Qmake project which has a lot of blocks like this for MSYS compatibility:
# VTK
win32 {
INCLUDEPATH += c:/msys64/mingw64/include/vtk-$${VTKVERSION}
LIBS += -Lc:/msys64/mingw64/lib
}
else {
INCLUDEPATH += $$VTKINCPATH
LIBS += -L$$VTKLIBPATH
}
This has worked fine up until now, but now I have a problem. Due to limited space, I have installed MSYS on an external D drive, which breaks all of these such include types.
Is there a programmatic way using either QMake or a command from within MSYS2 to get the drive letter that MSYS is currently installed in?
Maybe I could stitch it together if PACMAN offers a drive path. If I try putting in the package name with -Ql, it just gives me the path relative to MSYS root, sadly.
The tool cygpath can do this.
The command I use is:
cygpath -m /Which in my case will print out:
D:/msys64/