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.

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