Meson: add libr_shlr.a building/installation rule (#9789)
* Meson: add libr_shlr.a building/installation rule * Meson: distribute *.lib/*.a files for Windows by default
This commit is contained in:
parent
089a201ebc
commit
8675e324ac
2 changed files with 21 additions and 6 deletions
|
|
@ -444,6 +444,21 @@ libr2ar = static_library('r2ar', ar_files,
|
|||
|
||||
libr_shlr = [
|
||||
libr2ar, libr2bochs, libr2capstone, libr2gdb, libr2grub, libr2java, libr2lz4,
|
||||
libr2qnx, libr2sdb, libr2spp, libr2spp, libr2tcc, libr2windbg,
|
||||
libr2zip
|
||||
libr2qnx, libr2sdb, libr2spp, libr2spp, libr2tcc, libr2windbg, libr2zip
|
||||
]
|
||||
|
||||
if cc.get_id() == 'msvc'
|
||||
cmd = ['lib', '/OUT:@OUTPUT@', '@INPUT@']
|
||||
else
|
||||
cmd = ['ar', 'csr', '@OUTPUT@', '@INPUT@']
|
||||
endif
|
||||
|
||||
custom_target('libr_shlr',
|
||||
input: libr_shlr,
|
||||
output: 'libr_shlr.a',
|
||||
command: cmd,
|
||||
build_by_default: true,
|
||||
build_always: false,
|
||||
install: true,
|
||||
install_dir: get_option('libdir')
|
||||
)
|
||||
|
|
|
|||
|
|
@ -170,10 +170,12 @@ def win_dist(args):
|
|||
makedirs(r'{DIST}')
|
||||
copy(r'{BUILDDIR}\binr\*\*.exe', r'{DIST}')
|
||||
copy(r'{BUILDDIR}\libr\*\*.dll', r'{DIST}')
|
||||
if args.copylib:
|
||||
makedirs(r'{DIST}\lib')
|
||||
makedirs(r'{DIST}\lib')
|
||||
if args.shared:
|
||||
copy(r'{BUILDDIR}\libr\*\*.lib', r'{DIST}\lib')
|
||||
else:
|
||||
copy(r'{BUILDDIR}\libr\*\*.a', r'{DIST}\lib')
|
||||
copy(r'{BUILDDIR}\shlr\libr_shlr.a', r'{DIST}\lib')
|
||||
win_dist_libr2()
|
||||
|
||||
def win_dist_libr2(**path_fmt):
|
||||
|
|
@ -257,8 +259,6 @@ def main():
|
|||
help='Adds support for Windows XP')
|
||||
if os.name == 'nt':
|
||||
parser.add_argument('--install', help='Installation directory')
|
||||
parser.add_argument('--copylib', action='store_true',
|
||||
help='Copy static libraries to the installation directory')
|
||||
else:
|
||||
parser.add_argument('--install', action='store_true',
|
||||
help='Install radare2 after building')
|
||||
|
|
|
|||
Loading…
Reference in a new issue