diff --git a/README.md b/README.md index eba4ff22..eb352355 100644 --- a/README.md +++ b/README.md @@ -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: - 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 - 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) ------------ diff --git a/libdino/meson.build b/libdino/meson.build index 356c15d3..cc2c4213 100644 --- a/libdino/meson.build +++ b/libdino/meson.build @@ -79,8 +79,8 @@ sources = files( ) sources += [version_vala] c_args = [ - '-DDINO_SYSTEM_LIBDIR_NAME="@0@"'.format(get_option('prefix') / get_option('libdir')), - '-DDINO_SYSTEM_PLUGIN_DIR="@0@"'.format(get_option('prefix') / get_option('plugindir')), + '-DDINO_SYSTEM_LIBDIR_NAME="@0@"'.format(get_option('libdir')), + '-DDINO_SYSTEM_PLUGIN_DIR="@0@"'.format(get_option('prefix') / get_option('libdir') / get_option('plugindir')), '-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]) diff --git a/meson_options.txt b/meson_options.txt index be486cb2..ec85ef0e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/plugins/http-files/meson.build b/plugins/http-files/meson.build index 09986c09..fb0b5be6 100644 --- a/plugins/http-files/meson.build +++ b/plugins/http-files/meson.build @@ -20,5 +20,5 @@ if dep_libsoup.version().version_compare('>=3.0') vala_args += ['--define=SOUP_3_0'] 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('.')) diff --git a/plugins/ice/meson.build b/plugins/ice/meson.build index 1ec3302e..78cc227c 100644 --- a/plugins/ice/meson.build +++ b/plugins/ice/meson.build @@ -32,5 +32,5 @@ c_args = [ vala_args = [ '--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('.')) diff --git a/plugins/meson.build b/plugins/meson.build index 67565f93..6ae68201 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,3 +1,5 @@ +install_options = {'install': true, 'install_dir': get_option('libdir') / get_option('plugindir')} + subdir('http-files') subdir('ice') subdir('notification-sound') diff --git a/plugins/notification-sound/meson.build b/plugins/notification-sound/meson.build index 5a114d86..af911377 100644 --- a/plugins/notification-sound/meson.build +++ b/plugins/notification-sound/meson.build @@ -15,5 +15,5 @@ sources = files( vala_args = [ '--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('.')) diff --git a/plugins/omemo/meson.build b/plugins/omemo/meson.build index 5835f00b..feda28c7 100644 --- a/plugins/omemo/meson.build +++ b/plugins/omemo/meson.build @@ -70,7 +70,7 @@ vala_args = [ if crypto_backend == 'gnutls' vala_args += ['-D', 'GCRYPT'] 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('.')) sources = files( diff --git a/plugins/openpgp/meson.build b/plugins/openpgp/meson.build index 806494f2..71e1c66f 100644 --- a/plugins/openpgp/meson.build +++ b/plugins/openpgp/meson.build @@ -39,5 +39,5 @@ c_args = [ vala_args = [ '--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('.')) diff --git a/plugins/rtp/meson.build b/plugins/rtp/meson.build index a222a05a..06cb2a1f 100644 --- a/plugins/rtp/meson.build +++ b/plugins/rtp/meson.build @@ -59,5 +59,5 @@ endif if get_option('plugin-rtp-vp9').allowed() vala_args += ['-D', 'ENABLE_VP9'] 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('.')) diff --git a/plugins/win32-fonts/meson.build b/plugins/win32-fonts/meson.build index 6ac20ea5..aeb8fcf7 100644 --- a/plugins/win32-fonts/meson.build +++ b/plugins/win32-fonts/meson.build @@ -37,5 +37,5 @@ if host_machine.system() == 'windows' link_args += ['-Wl,--export-all-symbols'] 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('.')) diff --git a/plugins/windows-notification/meson.build b/plugins/windows-notification/meson.build index 005d9322..35b8beb9 100644 --- a/plugins/windows-notification/meson.build +++ b/plugins/windows-notification/meson.build @@ -70,5 +70,5 @@ if host_machine.system() == 'windows' link_args += ['-Wl,--export-all-symbols'] 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('.'))