build: ensure -DBINARY_DIR is set in cmake.