Besides using a statically built Qt (and pointing to it using -DQT=/path/to/qt),
you need to pass -DSTATIC=1 to cmake to enable proper linking. It also makes sense
to put static versions of libstdc++ and openssl into ${BUILD_DIR}/staticlibs.
NOTE that ${BUILD_DIR} is the dir you run cmake from, NOT the source dir.