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.

143 lines
4.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. 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/find-my-phone.vala',
  40. 'src/mconnect/find-my-phone-proxy.vala',
  41. 'src/mconnect/mousepad.vala',
  42. 'src/mconnect/ping.vala',
  43. 'src/mconnect/ping-proxy.vala',
  44. 'src/mconnect/config.vala',
  45. 'src/mconnect/application.vala',
  46. 'src/mconnect/utils.vala',
  47. 'src/mconnect/property-proxy.vala',
  48. 'src/mconnect/share.vala',
  49. 'src/mconnect/share-proxy.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. 'src/mconnectctl/find-my-phone-iface.vala',
  75. ]
  76. executable('mconnectctl', mconnectctl_src,
  77. dependencies : [glib_dep, gobject_dep,
  78. gio_dep, gio_unix_dep],
  79. install: true)
  80. # tests
  81. test_mconn_crypt_src = [
  82. 'test/mconn-crypt-vala-test.vala',
  83. 'src/crypt/certificate.vala',
  84. ]
  85. test_mconn_crypt = executable('test-mconn-crypt', test_mconn_crypt_src,
  86. dependencies: [
  87. glib_dep, gobject_dep,
  88. gio_dep, gio_unix_dep,
  89. gnutls_dep, posix_dep,
  90. ],
  91. install: false)
  92. test('mconn-crypt', test_mconn_crypt)
  93. test_mconn_utils_src = [
  94. 'test/mconn-utils-test.vala',
  95. 'src/mconnect/utils.vala',
  96. 'src/mconnect/logging.vala',
  97. ]
  98. test_mconn_utils = executable('test-mconn-utils', test_mconn_utils_src,
  99. dependencies: [
  100. glib_dep, gobject_dep,
  101. gio_dep, gio_unix_dep,
  102. posix_dep, libnotify_dep,
  103. ],
  104. install: false)
  105. test('mconn-utils', test_mconn_utils)
  106. # other files
  107. applicationsdir = join_paths(get_option('datadir'),
  108. 'applications')
  109. conf = configuration_data()
  110. conf.set('bindir',
  111. join_paths(get_option('prefix'), get_option('bindir')))
  112. configure_file(output: 'mconnect.desktop',
  113. input: 'mconnect.desktop.in',
  114. configuration: conf,
  115. install_dir: applicationsdir)
  116. mconnectdatadir = join_paths(get_option('datadir'),
  117. 'mconnect')
  118. install_data('mconnect.conf',
  119. install_dir: mconnectdatadir,
  120. install_mode: 'rw-r--r--')
  121. # other targets
  122. gdb_conf = configuration_data()
  123. gdb_conf.set('bindir', meson.build_root())
  124. gdb_script = configure_file(output: 'gdb-script',
  125. input: 'gdb-script.in',
  126. configuration: gdb_conf)
  127. run_target('run-gdb',
  128. command: ['gdb', '-x', join_paths(meson.build_root(), 'gdb-script')],
  129. depends: [mconnect_prog])