def METHOD_NAME(self):
    """
    Run qmake on the GUI, if necessary
    """
    if self.cfg['build_gui']:
        cmd = 'qmake QMAKE_CXX="$CXX" QMAKE_LINK="$CXX"'
        if self.cfg['have_rules']:
            cmd = ' '.join([cmd, 'HAVE_RULES=yes'])
        gui_dir = os.path.join(self.cfg['start_dir'], 'gui')
        try:
            os.chdir(gui_dir)
            run_cmd(cmd, log_all=True, simple=True)
            os.chdir(self.cfg['start_dir'])
        except OSError as err:
            raise EasyBuildError("Moving to %s and configure the GUI build failed: %s", gui_dir, err)
    else:
        self.log.debug("Configuration of the GUI skipped")