messenger-gtk

Gtk+3 graphical user interfaces for GNUnet Messenger
Log | Files | Refs | Submodules | README | LICENSE

meson.build (2781B)


      1 #
      2 # This file is part of GNUnet.
      3 # Copyright (C) 2023--2024 GNUnet e.V.
      4 #
      5 # GNUnet is free software: you can redistribute it and/or modify it
      6 # under the terms of the GNU Affero General Public License as published
      7 # by the Free Software Foundation, either version 3 of the License,
      8 # or (at your option) any later version.
      9 #
     10 # GNUnet is distributed in the hope that it will be useful, but
     11 # WITHOUT ANY WARRANTY; without even the implied warranty of
     12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13 # Affero General Public License for more details.
     14 #
     15 # You should have received a copy of the GNU Affero General Public License
     16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 #
     18 # SPDX-License-Identifier: AGPL3.0-or-later
     19 #
     20 
     21 project(
     22     'messenger-gtk',
     23     'c',
     24     license: 'AGPL3.0-or-later',
     25     version: run_command('contrib/get_version.sh').stdout().strip(),
     26     meson_version: '>= 1.1.0',
     27     default_options: [
     28         'use_libportal=true',
     29         'use_eventfd=true'
     30     ]
     31 )
     32 
     33 meson.add_dist_script('contrib/distribute_version.sh', meson.project_version())
     34 
     35 use_libportal = get_option('use_libportal')
     36 use_eventfd = get_option('use_eventfd')
     37 
     38 messenger_gtk_id = 'org.gnunet.Messenger'
     39 
     40 gnome = import('gnome')
     41 
     42 src_resources = include_directories('src', 'resources')
     43 
     44 subdir('submodules')
     45 
     46 messenger_gtk_deps = [
     47     dependency('gnunetchat'),
     48     dependency('gnunetutil'),
     49     dependency('glib-2.0'),
     50     dependency('gtk+-3.0'),
     51     dependency('libhandy-1'),
     52     dependency('gstreamer-1.0'),
     53     dependency('gstreamer-rtp-1.0'),
     54     dependency('libnotify'),
     55     dependency('libqrencode'),
     56     dependency('libpipewire-0.3'),
     57     declare_dependency(link_args: '-lunistring'),
     58 ]
     59 
     60 messenger_gtk_args = [
     61     '-DENABLE_NLS=1',
     62     '-DMESSENGER_APPLICATION_BINARY="@0@"'.format(meson.project_name()),
     63     '-DMESSENGER_APPLICATION_ID="@0@"'.format(messenger_gtk_id),
     64     '-DMESSENGER_APPLICATION_VERSION="@0@"'.format(meson.project_version()),
     65 ]
     66 
     67 if use_libportal
     68     messenger_gtk_deps += [
     69         dependency('libportal'),
     70         dependency('libportal-gtk3'),
     71     ]
     72 else
     73     messenger_gtk_args += [
     74         '-DMESSENGER_APPLICATION_NO_PORTAL=1',
     75     ]
     76 endif
     77 
     78 if use_eventfd
     79 else
     80     messenger_gtk_args += [
     81         '-DMESSENGER_APPLICATION_NO_EVENT_FD=1',
     82     ]
     83 endif
     84 
     85 subdir('po')
     86 subdir('resources')
     87 subdir('src')
     88 
     89 messenger_gtk_exec = executable(
     90     meson.project_name(),
     91     messenger_gtk_resources + messenger_gtk_sources,
     92     c_args: messenger_gtk_args,
     93     install: true,
     94     dependencies: messenger_gtk_deps,
     95     extra_files: submodules_headers,
     96     include_directories: [
     97         src_resources, 
     98         submodules_includes,
     99     ],
    100 )
    101 
    102 gnome.post_install(
    103     gtk_update_icon_cache: true,
    104     update_desktop_database: true,
    105 )