2018-02-09 19:51:30 +00:00
|
|
|
#TODO: icon
|
2018-03-04 17:42:02 +00:00
|
|
|
project('Cutter', 'cpp', default_options: 'cpp_std=c++11')
|
2018-02-09 19:51:30 +00:00
|
|
|
|
2018-03-03 07:03:08 +00:00
|
|
|
feature_define_args = []
|
|
|
|
if get_option('enable_jupyter')
|
|
|
|
message('Jupyter support enabled')
|
|
|
|
add_project_arguments('-DCUTTER_ENABLE_JUPYTER', language: 'cpp')
|
|
|
|
feature_define_args += ['-DCUTTER_ENABLE_JUPYTER']
|
|
|
|
if get_option('enable_webengine')
|
|
|
|
message('QtWebEngine support enabled')
|
|
|
|
add_project_arguments('-DCUTTER_ENABLE_QTWEBENGINE', language: 'cpp')
|
|
|
|
feature_define_args += ['-DCUTTER_ENABLE_QTWEBENGINE']
|
|
|
|
endif
|
|
|
|
endif
|
2018-03-02 13:15:53 +00:00
|
|
|
|
2018-02-09 19:51:30 +00:00
|
|
|
qt5_mod = import('qt5')
|
|
|
|
|
|
|
|
version = get_option('version')
|
|
|
|
|
|
|
|
qt_modules = get_option('qt_modules')
|
|
|
|
sources = get_option('sources')
|
|
|
|
headers = get_option('headers')
|
|
|
|
ui_files = get_option('ui_files')
|
|
|
|
qresources = get_option('qresources')
|
|
|
|
|
|
|
|
qt5dep = dependency('qt5', modules: qt_modules)
|
|
|
|
|
|
|
|
moc_files = qt5_mod.preprocess(
|
|
|
|
moc_headers: headers,
|
|
|
|
ui_files: ui_files,
|
2018-03-02 15:42:41 +00:00
|
|
|
qresources: qresources,
|
|
|
|
moc_extra_arguments: feature_define_args
|
2018-02-09 19:51:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cpp = meson.get_compiler('cpp')
|
|
|
|
|
|
|
|
platform_inc = []
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
add_project_arguments('-D_CRT_NONSTDC_NO_DEPRECATE', language: 'cpp')
|
|
|
|
add_project_arguments('-D_CRT_SECURE_NO_WARNINGS', language: 'cpp')
|
2018-04-05 08:05:00 +00:00
|
|
|
platform_inc = include_directories('../radare2/libr/include/msvc')
|
2018-03-03 07:03:08 +00:00
|
|
|
# Workaround for https://github.com/mesonbuild/meson/issues/2327
|
|
|
|
qt_lib = run_command('qmake', '-query', 'QT_HOST_LIBS').stdout().strip()
|
|
|
|
add_project_link_arguments(join_paths(qt_lib, 'qtmain.lib'), language: 'cpp')
|
2018-02-09 19:51:30 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
add_project_arguments('-DAPP_VERSION="@0@"'.format(version), language: 'cpp')
|
|
|
|
|
|
|
|
r2 = subproject('radare2')
|
|
|
|
libr2_dep = r2.get_variable('libr2_dep')
|
|
|
|
|
2018-03-03 07:03:08 +00:00
|
|
|
deps = [libr2_dep, qt5dep]
|
|
|
|
if get_option('enable_jupyter')
|
|
|
|
deps += [dependency('python3')]
|
|
|
|
endif
|
|
|
|
|
2018-02-09 19:51:30 +00:00
|
|
|
cutter_exe = executable(
|
|
|
|
'Cutter',
|
|
|
|
moc_files,
|
2018-03-03 07:03:08 +00:00
|
|
|
gui_app: true,
|
2018-02-09 19:51:30 +00:00
|
|
|
sources: sources,
|
|
|
|
include_directories: platform_inc,
|
2018-03-03 07:03:08 +00:00
|
|
|
dependencies: deps,
|
2018-02-09 19:51:30 +00:00
|
|
|
)
|