mconnect - KDE Connect protocol implementation in Vala/C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.8 KiB

  1. project('mconnect', 'vala', 'c')
  2. # dependencies
  3. glib_dep = dependency('glib-2.0')
  4. gobject_dep = dependency('gobject-2.0')
  5. gio_dep = dependency('gio-2.0')
  6. gio_unix_dep = dependency('gio-unix-2.0')
  7. json_glib_dep = dependency('json-glib-1.0')
  8. gee_dep = dependency('gee-0.8')
  9. libnotify_dep = dependency('libnotify')
  10. gdk_dep = dependency('gdk-3.0')
  11. atspi_dep = dependency('atspi-2')
  12. gnutls_dep = dependency('gnutls')
  13. posix_dep = meson.get_compiler('vala').find_library('posix')
  14. add_project_arguments(['--vapidir',
  15. join_paths(meson.current_source_dir(), 'vapi')],
  16. language: 'vala')
  17. # binaries
  18. mconnect_src = [
  19. 'src/mconnect/main.vala',
  20. 'src/mconnect/discovery.vala',
  21. 'src/mconnect/packet.vala',
  22. 'src/mconnect/device.vala',
  23. 'src/mconnect/discovereddevice.vala',
  24. 'src/mconnect/device-proxy.vala',
  25. 'src/mconnect/devicemanager.vala',
  26. 'src/mconnect/devicemanager-proxy.vala',
  27. 'src/mconnect/devicechannel.vala',
  28. 'src/mconnect/core.vala',
  29. 'src/mconnect/packethandlerinterface.vala',
  30. 'src/mconnect/packethandlerinterface-proxy.vala',
  31. 'src/mconnect/packethandlers.vala',
  32. 'src/mconnect/packethandlers-proxy.vala',
  33. 'src/mconnect/notification.vala',
  34. 'src/mconnect/battery.vala',
  35. 'src/mconnect/battery-proxy.vala',
  36. 'src/mconnect/telephony.vala',
  37. 'src/mconnect/mousepad.vala',
  38. 'src/mconnect/ping.vala',
  39. 'src/mconnect/ping-proxy.vala',
  40. 'src/mconnect/config.vala',
  41. 'src/mconnect/application.vala',
  42. 'src/mconnect/utils.vala',
  43. 'src/mconnect/property-proxy.vala',
  44. 'src/crypt/certificate.vala',
  45. ]
  46. mconnect_prog = executable('mconnect', mconnect_src,
  47. dependencies : [glib_dep, gobject_dep,
  48. gio_dep, gio_unix_dep,
  49. json_glib_dep, gee_dep,
  50. libnotify_dep, gdk_dep,
  51. atspi_dep, gnutls_dep,
  52. posix_dep],
  53. install: true)
  54. mconnectctl_src = 'src/mconnectctl/main.vala'
  55. executable('mconnectctl', mconnectctl_src,
  56. dependencies : [glib_dep, gobject_dep,
  57. gio_dep, gio_unix_dep,
  58. json_glib_dep, gee_dep,
  59. libnotify_dep, gdk_dep,
  60. atspi_dep, gnutls_dep],
  61. install: true)
  62. # tests
  63. test_mconn_crypt_src = [
  64. 'test/mconn-crypt-vala-test.vala',
  65. 'src/crypt/certificate.vala',
  66. ]
  67. test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
  68. dependencies: [
  69. glib_dep, gobject_dep,
  70. gio_dep, gio_unix_dep,
  71. gnutls_dep, posix_dep,
  72. ],
  73. install: false)
  74. test('mconn-crypt', test_mconn_crypt)
  75. # other files
  76. applicationsdir = join_paths(get_option('datadir'),
  77. 'applications')
  78. conf = configuration_data()
  79. conf.set('bindir',
  80. join_paths(get_option('prefix'), get_option('bindir')))
  81. configure_file(output: 'mconnect.desktop',
  82. input: 'mconnect.desktop.in',
  83. configuration: conf,
  84. install_dir: applicationsdir)
  85. mconnectdatadir = join_paths(get_option('datadir'),
  86. 'mconnect')
  87. install_data('mconnect.conf',
  88. install_dir: mconnectdatadir,
  89. install_mode: 'rw-r--r--')
  90. # other targets
  91. gdb_conf = configuration_data()
  92. gdb_conf.set('bindir', meson.build_root())
  93. gdb_script = configure_file(output: 'gdb-script',
  94. input: 'gdb-script.in',
  95. configuration: gdb_conf)
  96. run_target('run-gdb',
  97. command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
  98. depends: [mconnect_prog])