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.

142 lines
4.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. 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/telephony-proxy.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/share-proxy.vala',
  48. 'src/mconnect/mpris.vala',
  49. 'src/mconnect/mpris-proxies.vala',
  50. 'src/mconnect/io-job.vala',
  51. 'src/mconnect/transfer-manager.vala',
  52. 'src/mconnect/transfer-manager-proxy.vala',
  53. 'src/mconnect/transfer-interface.vala',
  54. 'src/mconnect/transfer-proxy.vala',
  55. 'src/mconnect/transfer-download.vala',
  56. 'src/mconnect/transfer-upload.vala',
  57. 'src/mconnect/logging.vala',
  58. 'src/crypt/certificate.vala',
  59. ]
  60. mconnect_prog = executable('mconnect', mconnect_src,
  61. dependencies : [glib_dep, gobject_dep,
  62. gio_dep, gio_unix_dep,
  63. json_glib_dep, gee_dep,
  64. libnotify_dep, gdk_dep,
  65. atspi_dep, gnutls_dep,
  66. posix_dep, gtk_dep],
  67. install: true)
  68. mconnectctl_src = [
  69. 'src/mconnectctl/main.vala',
  70. 'src/mconnectctl/device-manager-iface.vala',
  71. 'src/mconnectctl/device-iface.vala',
  72. 'src/mconnectctl/share-iface.vala',
  73. 'src/mconnectctl/telephony-iface.vala',
  74. ]
  75. executable('mconnectctl', mconnectctl_src,
  76. dependencies : [glib_dep, gobject_dep,
  77. gio_dep, gio_unix_dep],
  78. install: true)
  79. # tests
  80. test_mconn_crypt_src = [
  81. 'test/mconn-crypt-vala-test.vala',
  82. 'src/crypt/certificate.vala',
  83. ]
  84. test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
  85. dependencies: [
  86. glib_dep, gobject_dep,
  87. gio_dep, gio_unix_dep,
  88. gnutls_dep, posix_dep,
  89. ],
  90. install: false)
  91. test('mconn-crypt', test_mconn_crypt)
  92. test_mconn_utils_src = [
  93. 'test/mconn-utils-test.vala',
  94. 'src/mconnect/utils.vala',
  95. 'src/mconnect/logging.vala',
  96. ]
  97. test_mconn_utils = executable('test-mconn-utils', test_mconn_utils_src,
  98. dependencies: [
  99. glib_dep, gobject_dep,
  100. gio_dep, gio_unix_dep,
  101. posix_dep, libnotify_dep,
  102. ],
  103. install: false)
  104. test('mconn-utils', test_mconn_utils)
  105. # other files
  106. applicationsdir = join_paths(get_option('datadir'),
  107. 'applications')
  108. conf = configuration_data()
  109. conf.set('bindir',
  110. join_paths(get_option('prefix'), get_option('bindir')))
  111. configure_file(output: 'mconnect.desktop',
  112. input: 'mconnect.desktop.in',
  113. configuration: conf,
  114. install_dir: applicationsdir)
  115. mconnectdatadir = join_paths(get_option('datadir'),
  116. 'mconnect')
  117. install_data('mconnect.conf',
  118. install_dir: mconnectdatadir,
  119. install_mode: 'rw-r--r--')
  120. # other targets
  121. gdb_conf = configuration_data()
  122. gdb_conf.set('bindir', meson.build_root())
  123. gdb_script = configure_file(output: 'gdb-script',
  124. input: 'gdb-script.in',
  125. configuration: gdb_conf)
  126. run_target('run-gdb',
  127. command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
  128. depends: [mconnect_prog])