meson: Fix plugindir search path

This commit is contained in:
Igor Sharonov 2024-04-04 17:15:11 +03:00 committed by Maxim Logaev
parent ff713338e0
commit c5587fe3b3
12 changed files with 21 additions and 14 deletions

View file

@ -73,11 +73,16 @@ Make sure to install all [dependencies](https://github.com/dino/dino/wiki/Build#
If you want to use `meson` build system, follow the next instructions: If you want to use `meson` build system, follow the next instructions:
meson setup build -Duse-soup2=true -Dcrypto-backend=gnutls -Dplugin-ice=enabled meson setup build -Dcrypto-backend=gnutls -Dplugin-ice=enabled
meson configure --prefix $PWD/build/install --libdir lib build
meson compile -C build meson compile -C build
build/main/dino meson install -C build
LD_LIBRARY_PATH+=:$PWD/build/install/lib build/install/bin/dino
If your `nice` library depends on `libsoup-3.0`, you can omit `-Duse-soup2=true` option. If your `nice` library depends on `libsoup-2.4` (consider `ldd` output for the `libnice.so`), you should additionally specify `-Duse-soup2=true` option.
`LD_LIBRARY_PATH` should point to the directory containing the `libdino.so` library.
Skip `meson configure` step, if you want to install the program globally.
You can specify any convenient directory in the option `--prefix` where the program will be installed.
Build on Windows (x86_64) Build on Windows (x86_64)
------------ ------------

View file

@ -79,8 +79,8 @@ sources = files(
) )
sources += [version_vala] sources += [version_vala]
c_args = [ c_args = [
'-DDINO_SYSTEM_LIBDIR_NAME="@0@"'.format(get_option('prefix') / get_option('libdir')), '-DDINO_SYSTEM_LIBDIR_NAME="@0@"'.format(get_option('libdir')),
'-DDINO_SYSTEM_PLUGIN_DIR="@0@"'.format(get_option('prefix') / get_option('plugindir')), '-DDINO_SYSTEM_PLUGIN_DIR="@0@"'.format(get_option('prefix') / get_option('libdir') / get_option('plugindir')),
'-DG_LOG_DOMAIN="libdino"', '-DG_LOG_DOMAIN="libdino"',
] ]
lib_dino = library('dino', sources, c_args: c_args, include_directories: include_directories('src'), dependencies: dependencies, version: '0.0', install: true, install_dir: [true, true, true]) lib_dino = library('dino', sources, c_args: c_args, include_directories: include_directories('src'), dependencies: dependencies, version: '0.0', install: true, install_dir: [true, true, true])

View file

@ -1,4 +1,4 @@
option('plugindir', type: 'string', value: 'lib/dino/plugins', description: 'Dino plugin directory') option('plugindir', type: 'string', value: 'dino/plugins', description: 'Dino plugin directory inside libdir')
option('crypto-backend', type: 'combo', choices: ['auto', 'openssl', 'gnutls'], value: 'auto', description: 'Preferred crypto backend') option('crypto-backend', type: 'combo', choices: ['auto', 'openssl', 'gnutls'], value: 'auto', description: 'Preferred crypto backend')

View file

@ -20,5 +20,5 @@ if dep_libsoup.version().version_compare('>=3.0')
vala_args += ['--define=SOUP_3_0'] vala_args += ['--define=SOUP_3_0']
endif endif
lib_http_files = shared_library('http-files', sources, name_prefix: '', vala_args: vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_http_files = shared_library('http-files', sources, name_prefix: '', vala_args: vala_args, dependencies: dependencies, kwargs: install_options)
dep_http_files = declare_dependency(link_with: lib_http_files, include_directories: include_directories('.')) dep_http_files = declare_dependency(link_with: lib_http_files, include_directories: include_directories('.'))

View file

@ -32,5 +32,5 @@ c_args = [
vala_args = [ vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi', '--vapidir', meson.current_source_dir() / 'vapi',
] ]
lib_ice = shared_library('ice', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_ice = shared_library('ice', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, dependencies: dependencies, kwargs: install_options)
dep_ice = declare_dependency(link_with: lib_ice, include_directories: include_directories('.')) dep_ice = declare_dependency(link_with: lib_ice, include_directories: include_directories('.'))

View file

@ -1,3 +1,5 @@
install_options = {'install': true, 'install_dir': get_option('libdir') / get_option('plugindir')}
subdir('http-files') subdir('http-files')
subdir('ice') subdir('ice')
subdir('notification-sound') subdir('notification-sound')

View file

@ -15,5 +15,5 @@ sources = files(
vala_args = [ vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi', '--vapidir', meson.current_source_dir() / 'vapi',
] ]
lib_notification_sound = shared_library('notification-sound', sources, name_prefix: '', vala_args: vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_notification_sound = shared_library('notification-sound', sources, name_prefix: '', vala_args: vala_args, dependencies: dependencies, kwargs: install_options)
dep_notification_sound = declare_dependency(link_with: lib_notification_sound, include_directories: include_directories('.')) dep_notification_sound = declare_dependency(link_with: lib_notification_sound, include_directories: include_directories('.'))

View file

@ -70,7 +70,7 @@ vala_args = [
if crypto_backend == 'gnutls' if crypto_backend == 'gnutls'
vala_args += ['-D', 'GCRYPT'] vala_args += ['-D', 'GCRYPT']
endif endif
lib_omemo = shared_library('omemo', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_omemo = shared_library('omemo', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, kwargs: install_options)
dep_omemo = declare_dependency(link_with: lib_omemo, include_directories: include_directories('.')) dep_omemo = declare_dependency(link_with: lib_omemo, include_directories: include_directories('.'))
sources = files( sources = files(

View file

@ -39,5 +39,5 @@ c_args = [
vala_args = [ vala_args = [
'--vapidir', meson.current_source_dir() / 'vapi', '--vapidir', meson.current_source_dir() / 'vapi',
] ]
lib_openpgp = shared_library('openpgp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_openpgp = shared_library('openpgp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, kwargs: install_options)
dep_openpgp = declare_dependency(link_with: lib_openpgp, include_directories: include_directories('.')) dep_openpgp = declare_dependency(link_with: lib_openpgp, include_directories: include_directories('.'))

View file

@ -59,5 +59,5 @@ endif
if get_option('plugin-rtp-vp9').allowed() if get_option('plugin-rtp-vp9').allowed()
vala_args += ['-D', 'ENABLE_VP9'] vala_args += ['-D', 'ENABLE_VP9']
endif endif
lib_rtp = shared_library('rtp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, install: true, install_dir: get_option('libdir') / 'dino/plugins') lib_rtp = shared_library('rtp', sources, name_prefix: '', c_args: c_args, vala_args: vala_args, include_directories: include_directories('src'), dependencies: dependencies, kwargs: install_options)
dep_rtp = declare_dependency(link_with: lib_rtp, include_directories: include_directories('.')) dep_rtp = declare_dependency(link_with: lib_rtp, include_directories: include_directories('.'))

View file

@ -37,5 +37,5 @@ if host_machine.system() == 'windows'
link_args += ['-Wl,--export-all-symbols'] link_args += ['-Wl,--export-all-symbols']
endif endif
libwin32_fonts = shared_library('win32-fonts', sources: sources, name_prefix:'', c_args: c_args, vala_args:vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir')/'dino/plugins', link_args: link_args) libwin32_fonts = shared_library('win32-fonts', sources: sources, name_prefix:'', c_args: c_args, vala_args:vala_args, dependencies: dependencies, link_args: link_args, kwargs: install_options)
dep_win32_fonts = declare_dependency(link_with: libwin32_fonts, include_directories: include_directories('.')) dep_win32_fonts = declare_dependency(link_with: libwin32_fonts, include_directories: include_directories('.'))

View file

@ -70,5 +70,5 @@ if host_machine.system() == 'windows'
link_args += ['-Wl,--export-all-symbols'] link_args += ['-Wl,--export-all-symbols']
endif endif
libwindows_notification = shared_library('windows-notification', sources: sources, include_directories: inc, name_prefix:'', c_args: c_args, vala_args:vala_args, dependencies: dependencies, install: true, install_dir: get_option('libdir')/'dino/plugins', link_args: link_args, cpp_args: cpp_args) libwindows_notification = shared_library('windows-notification', sources: sources, include_directories: inc, name_prefix:'', c_args: c_args, vala_args:vala_args, dependencies: dependencies, link_args: link_args, cpp_args: cpp_args, kwargs: install_options)
dep_windows_notification = declare_dependency(link_with: libwindows_notification, include_directories: include_directories('.')) dep_windows_notification = declare_dependency(link_with: libwindows_notification, include_directories: include_directories('.'))