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.

127 lines
4.3 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. gtk_dep = dependency('gtk+-3.0')
  12. atspi_dep = dependency('atspi-2')
  13. gnutls_dep = dependency('gnutls')
  14. posix_dep = meson.get_compiler('vala').find_library('posix')
  15. add_project_arguments(['--vapidir',
  16. join_paths(meson.current_source_dir(), 'vapi')],
  17. language: 'vala')
  18. # binaries
  19. mconnect_src = [
  20. 'src/mconnect/main.vala',
  21. 'src/mconnect/discovery.vala',
  22. 'src/mconnect/packet.vala',
  23. 'src/mconnect/device.vala',
  24. 'src/mconnect/discovereddevice.vala',
  25. 'src/mconnect/device-proxy.vala',
  26. 'src/mconnect/devicemanager.vala',
  27. 'src/mconnect/devicemanager-proxy.vala',
  28. 'src/mconnect/devicechannel.vala',
  29. 'src/mconnect/core.vala',
  30. 'src/mconnect/packethandlerinterface.vala',
  31. 'src/mconnect/packethandlerinterface-proxy.vala',
  32. 'src/mconnect/packethandlers.vala',
  33. 'src/mconnect/packethandlers-proxy.vala',
  34. 'src/mconnect/notification.vala',
  35. 'src/mconnect/battery.vala',
  36. 'src/mconnect/battery-proxy.vala',
  37. 'src/mconnect/telephony.vala',
  38. 'src/mconnect/mousepad.vala',
  39. 'src/mconnect/ping.vala',
  40. 'src/mconnect/ping-proxy.vala',
  41. 'src/mconnect/config.vala',
  42. 'src/mconnect/application.vala',
  43. 'src/mconnect/utils.vala',
  44. 'src/mconnect/property-proxy.vala',
  45. 'src/mconnect/share.vala',
  46. 'src/mconnect/transfer.vala',
  47. 'src/mconnect/transfer-download.vala',
  48. 'src/mconnect/logging.vala',
  49. 'src/crypt/certificate.vala',
  50. ]
  51. mconnect_prog = executable('mconnect', mconnect_src,
  52. dependencies : [glib_dep, gobject_dep,
  53. gio_dep, gio_unix_dep,
  54. json_glib_dep, gee_dep,
  55. libnotify_dep, gdk_dep,
  56. atspi_dep, gnutls_dep,
  57. posix_dep, gtk_dep],
  58. install: true)
  59. mconnectctl_src = 'src/mconnectctl/main.vala'
  60. executable('mconnectctl', mconnectctl_src,
  61. dependencies : [glib_dep, gobject_dep,
  62. gio_dep, gio_unix_dep],
  63. install: true)
  64. # tests
  65. test_mconn_crypt_src = [
  66. 'test/mconn-crypt-vala-test.vala',
  67. 'src/crypt/certificate.vala',
  68. ]
  69. test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
  70. dependencies: [
  71. glib_dep, gobject_dep,
  72. gio_dep, gio_unix_dep,
  73. gnutls_dep, posix_dep,
  74. ],
  75. install: false)
  76. test('mconn-crypt', test_mconn_crypt)
  77. test_mconn_utils_src = [
  78. 'test/mconn-utils-test.vala',
  79. 'src/mconnect/utils.vala',
  80. 'src/mconnect/logging.vala',
  81. ]
  82. test_mconn_utils = executable('test-mconn-utils', test_mconn_utils_src,
  83. dependencies: [
  84. glib_dep, gobject_dep,
  85. gio_dep, gio_unix_dep,
  86. posix_dep,
  87. ],
  88. install: false)
  89. test('mconn-utils', test_mconn_utils)
  90. # other files
  91. applicationsdir = join_paths(get_option('datadir'),
  92. 'applications')
  93. conf = configuration_data()
  94. conf.set('bindir',
  95. join_paths(get_option('prefix'), get_option('bindir')))
  96. configure_file(output: 'mconnect.desktop',
  97. input: 'mconnect.desktop.in',
  98. configuration: conf,
  99. install_dir: applicationsdir)
  100. mconnectdatadir = join_paths(get_option('datadir'),
  101. 'mconnect')
  102. install_data('mconnect.conf',
  103. install_dir: mconnectdatadir,
  104. install_mode: 'rw-r--r--')
  105. # other targets
  106. gdb_conf = configuration_data()
  107. gdb_conf.set('bindir', meson.build_root())
  108. gdb_script = configure_file(output: 'gdb-script',
  109. input: 'gdb-script.in',
  110. configuration: gdb_conf)
  111. run_target('run-gdb',
  112. command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
  113. depends: [mconnect_prog])