mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Fix Meson
This commit is contained in:
parent
f89d9c0434
commit
7ae1cee66b
7
meson.py
7
meson.py
@ -59,7 +59,8 @@ def parse_qmake_file():
|
||||
VARS[var_name].append(word)
|
||||
if end_of_def:
|
||||
var_name = None
|
||||
VARS['QT'] = list(map(str.title, VARS['QT']))
|
||||
qt_mod_translation = { "webenginewidgets": "WebEngineWidgets" }
|
||||
VARS['QT'] = list(map(lambda s: qt_mod_translation[s] if s in qt_mod_translation else str.title(s), VARS['QT']))
|
||||
log.debug('Variables: \n%s', pprint.pformat(VARS, compact=True))
|
||||
|
||||
def win_dist(args):
|
||||
@ -121,7 +122,7 @@ def main():
|
||||
parser.add_argument('--dist', help='dist directory')
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.dist and os.path.exists(args.dist):
|
||||
if hasattr(args, 'dist') and args.dist and os.path.exists(args.dist):
|
||||
log.error('%s already exists', args.dist)
|
||||
sys.exit(1)
|
||||
|
||||
@ -132,7 +133,7 @@ def main():
|
||||
|
||||
build(args)
|
||||
|
||||
if args.dist:
|
||||
if hasattr(args, 'dist') and args.dist:
|
||||
win_dist(args)
|
||||
|
||||
import_r2_meson_mod()
|
||||
|
@ -5,8 +5,12 @@ project('cutter', 'cpp', default_options: 'cpp_std=c++11')
|
||||
console = false
|
||||
|
||||
#TODO: make optional
|
||||
add_project_arguments('-DCUTTER_ENABLE_JUPYTER', language: 'cpp')
|
||||
add_project_arguments('-DCUTTER_ENABLE_QTWEBENGINE', language: 'cpp')
|
||||
feature_define_args = [
|
||||
'-DCUTTER_ENABLE_JUPYTER',
|
||||
'-DCUTTER_ENABLE_QTWEBENGINE'
|
||||
]
|
||||
|
||||
add_project_arguments(feature_define_args, language: 'cpp')
|
||||
|
||||
qt5_mod = import('qt5')
|
||||
|
||||
@ -23,7 +27,8 @@ qt5dep = dependency('qt5', modules: qt_modules)
|
||||
moc_files = qt5_mod.preprocess(
|
||||
moc_headers: headers,
|
||||
ui_files: ui_files,
|
||||
qresources: qresources
|
||||
qresources: qresources,
|
||||
moc_extra_arguments: feature_define_args
|
||||
)
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
Loading…
Reference in New Issue
Block a user