def METHOD_NAME(self):
    """
    Run qmake on the GUI, if necessary
    """
    configopts = self.cfg['configopts']
    configopts = configopts.split('-- ' if configopts.startswith('-- ') else ' -- ', 1)
    configure_opts = configopts[0]
    cmake_opts = configopts[1] if len(configopts) == 2 else ''
    add_configure_opts = {'parallel': '%(parallel)s'}
    if build_option('debug'):
        add_configure_opts['verbose'] = None
    add_cmake_opts = {}
    if self.cfg['use_openssl']:
        add_cmake_opts['CMAKE_USE_OPENSSL'] = 'ON'
    cmake_prefix_path = os.environ.get('CMAKE_PREFIX_PATH', '').split(':')
    cmake_library_path = os.environ.get('CMAKE_LIBRARY_PATH', '').split(':')
    cmake_include_path = []
    available_system_options = ['BZIP2', 'CURL', 'EXPAT', 'LIBARCHIVE', 'ZLIB']
    for dep in self.cfg.dependencies():
        dep_name = dep['name']
        dep_root = get_software_root(dep_name)
        if not dep_root:
            self.log.debug('Skipping dependency %s as it was not found', dep_name)
            continue
        # Allow CMake to find this dependency
        if dep_root in cmake_prefix_path:
            self.log.debug('Not adding dependency %s to CMAKE_PREFIX_PATH as it is already contained', dep_name)
        else:
            cmake_prefix_path.append(dep_root)
        dep_lib_dir = get_software_libdir(dep_name, only_one=False)
        for lib_dir in dep_lib_dir or []:
            # /lib is automatically searched, so skip that
            if os.path.basename(lib_dir) != 'lib' and lib_dir not in cmake_library_path:
                cmake_library_path.append(lib_dir)
        dep_name_upper = dep_name.upper()
        # Do not add this option if --system-<lib> or --no-system-<lib> is passed to configure
        if dep_name_upper in available_system_options and '-system-' + dep_name.lower() not in configure_opts:
            add_cmake_opts['CMAKE_USE_SYSTEM_' + dep_name_upper] = 'ON'
    cmake_path_env_vars = {
        'CMAKE_PREFIX_PATH': cmake_prefix_path,
        'CMAKE_LIBRARY_PATH': cmake_library_path,
        'CMAKE_INCLUDE_PATH': cmake_include_path,
    }
    for var, values in cmake_path_env_vars.items():
        value = ':'.join(values)
        if os.environ.get(var, '') != value:
            env.setvar(var, value)
    for var, value in add_configure_opts.items():
        if '--' + var not in cmake_opts:
            configure_opts += ' --' + var if value is None else ' --%s=%s' % (var, value)
    for var, value in add_cmake_opts.items():
        if '-D%s=' % var not in cmake_opts:
            cmake_opts += ' -D%s=%s' % (var, value)
    self.cfg['configopts'] = configure_opts + ' -- ' + cmake_opts
    super(EB_CMake, self).METHOD_NAME()