if(NOTCMAKE_PREFIX_PATHANDNOTQt5Widgets_DIR)message("CMAKE_PREFIX_PATH is not defined, you may need to set it ""(-DCMAKE_PREFIX_PATH=\"path/to/Qt/lib/cmake\" or -DCMAKE_PREFIX_PATH=/usr/include/{host}/qt{version}/ on Ubuntu)")message("CMAKE_PREFIX_PATH is not defined.""find_package(Qt5) is probably not going to work. "" Set the CMAKE_PREFIX_PATH environment variable to the install prefix of Qt 5"" - Set it in the command line as -DCMAKE_PREFIX_PATH=\"path/to/Qt5/lib/cmake\""" - Or set it in your build script with set(CMAKE_PREFIX_PATH path/to/Qt5/lib/cmake)")endif()