If it doesn't detect Qt CMAKE_PREFIX_PATH needs to be set export CMAKE_PREFIX_PATH=/usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/data/cmake