mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-17 04:39:36 +00:00
shlr/meson: use source path to store capstone directory (#10993)
* shlr/meson: use an option to chose whether to use builddir or not
This commit is contained in:
parent
54176f1bbc
commit
4b2e1359ab
1
.gitignore
vendored
1
.gitignore
vendored
@ -69,7 +69,6 @@ shlr/sdb/src/sdb_version.h
|
||||
shlr/sdb/src/libsdb.so*
|
||||
shlr/spp/config.h
|
||||
sys/travis/*.txt
|
||||
shlr/capstone/
|
||||
sys/.mark_python-deps
|
||||
sys/.mark_swig
|
||||
sys/_work
|
||||
|
@ -12,6 +12,7 @@ option('r2_hud', type: 'string', value: '')
|
||||
option('r2_version_commit', type: 'string', value: '')
|
||||
option('r2_gittap', type: 'string', value: '')
|
||||
option('r2_gittip', type: 'string', value: '')
|
||||
option('capstone_in_builddir', type: 'boolean', value: false, description: 'When true, capstone is downloaded in the build directory and not in the source one')
|
||||
option('use_sys_capstone', type: 'boolean', value: false)
|
||||
option('use_sys_magic', type: 'boolean', value: false)
|
||||
option('use_sys_zip', type: 'boolean', value: false)
|
||||
|
@ -3,7 +3,12 @@ capstone_dep = dependency('capstone', version: '>=3.0.4', required: false)
|
||||
if not capstone_dep.found() or not get_option('use_sys_capstone')
|
||||
message('Use bundled capstone')
|
||||
|
||||
capstone_path = join_paths(meson.current_build_dir(), 'capstone')
|
||||
if get_option('capstone_in_builddir')
|
||||
capstone_path = join_paths(meson.current_build_dir(), 'capstone')
|
||||
else
|
||||
capstone_path = join_paths(meson.current_source_dir(), 'capstone')
|
||||
endif
|
||||
|
||||
res = run_command(py3_exe, '-c', '__import__("sys").exit(__import__("os").path.exists("@0@"))'.format(capstone_path))
|
||||
if res.returncode() == 0
|
||||
if not git_exe.found()
|
||||
|
Loading…
x
Reference in New Issue
Block a user