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.

115 lines
3.9 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/mconnect/share.vala',
  45. 'src/mconnect/transfer.vala',
  46. 'src/mconnect/transfer-download.vala',
  47. 'src/mconnect/logging.vala',
  48. 'src/crypt/certificate.vala',
  49. ]
  50. mconnect_prog = executable('mconnect', mconnect_src,
  51. dependencies : [glib_dep, gobject_dep,
  52. gio_dep, gio_unix_dep,
  53. json_glib_dep, gee_dep,
  54. libnotify_dep, gdk_dep,
  55. atspi_dep, gnutls_dep,
  56. posix_dep],
  57. install: true)
  58. mconnectctl_src = 'src/mconnectctl/main.vala'
  59. executable('mconnectctl', mconnectctl_src,
  60. dependencies : [glib_dep, gobject_dep,
  61. gio_dep, gio_unix_dep,
  62. json_glib_dep, gee_dep,
  63. libnotify_dep, gdk_dep,
  64. atspi_dep, gnutls_dep],
  65. install: true)
  66. # tests
  67. test_mconn_crypt_src = [
  68. 'test/mconn-crypt-vala-test.vala',
  69. 'src/crypt/certificate.vala',
  70. ]
  71. test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
  72. dependencies: [
  73. glib_dep, gobject_dep,
  74. gio_dep, gio_unix_dep,
  75. gnutls_dep, posix_dep,
  76. ],
  77. install: false)
  78. test('mconn-crypt', test_mconn_crypt)
  79. # other files
  80. applicationsdir = join_paths(get_option('datadir'),
  81. 'applications')
  82. conf = configuration_data()
  83. conf.set('bindir',
  84. join_paths(get_option('prefix'), get_option('bindir')))
  85. configure_file(output: 'mconnect.desktop',
  86. input: 'mconnect.desktop.in',
  87. configuration: conf,
  88. install_dir: applicationsdir)
  89. mconnectdatadir = join_paths(get_option('datadir'),
  90. 'mconnect')
  91. install_data('mconnect.conf',
  92. install_dir: mconnectdatadir,
  93. install_mode: 'rw-r--r--')
  94. # other targets
  95. gdb_conf = configuration_data()
  96. gdb_conf.set('bindir', meson.build_root())
  97. gdb_script = configure_file(output: 'gdb-script',
  98. input: 'gdb-script.in',
  99. configuration: gdb_conf)
  100. run_target('run-gdb',
  101. command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
  102. depends: [mconnect_prog])