meson.build 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Copyright 2017 Daniel 'grindhold' Brendle
  2. #
  3. # This file is part of parceldude.
  4. #
  5. # parceldude is free software: you can redistribute it and/or
  6. # modify it under the terms of the GNU General Public License
  7. # as published by the Free Software Foundation, either
  8. # version 3 of the License, or (at your option) any later
  9. # version.
  10. #
  11. # parceldude is distributed in the hope that it will be
  12. # useful, but WITHOUT ANY WARRANTY; without even the implied
  13. # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  14. # PURPOSE. See the GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public
  17. # License along with parceldude.
  18. # If not, see http://www.gnu.org/licenses/.
  19. project ('parceldude', 'vala', 'c')
  20. pkgconfig = import('pkgconfig')
  21. gnome = import('gnome')
  22. if (host_machine.system() == 'windows')
  23. windows = import('windows')
  24. endif
  25. dep_glib = dependency('glib-2.0')
  26. dep_gtk = dependency('gtk+-3.0')
  27. dep_libmsi = dependency('libmsi-1.0', required: false)
  28. valaflag = []
  29. linkflag = []
  30. if (host_machine.system() == 'windows')
  31. valaflag = ['--define=WIN32']
  32. linkflag = ['-mwindows']
  33. endif
  34. if dep_libmsi.found()
  35. valaflag += ['--define=HAS_LIBMSI']
  36. endif
  37. parceldude_app_dep = [dep_glib, dep_gtk, dep_libmsi]
  38. if (host_machine.system() == 'windows')
  39. parceldude_winres = windows.compile_resources(
  40. meson.current_source_dir()+'/data/parceldude.rc'
  41. )
  42. else
  43. parceldude_winres = []
  44. endif
  45. parceldude_resources = gnome.compile_resources(
  46. 'parceldude-resources',
  47. meson.current_source_dir()+'/data/de.grindhold.parceldude.gresource.xml',
  48. source_dir: 'data')
  49. #TODO: make icon creation via icotools part of this build
  50. # icotools -c -o data/icons/parceldude.ico `find data/icons -name "*.png"`
  51. parceldude_app_src = [
  52. 'src/about.vala',
  53. 'src/donationview.vala',
  54. 'src/feature.vala',
  55. 'src/installer.vala',
  56. 'src/installview.vala',
  57. 'src/list.vala',
  58. 'src/main.vala',
  59. 'src/parameter.vala',
  60. ]
  61. parceldude_app = executable('parceldude', parceldude_app_src, parceldude_resources, parceldude_winres,
  62. dependencies: parceldude_app_dep,
  63. install:true,
  64. vala_args: ['--target-glib=2.38'] + valaflag,
  65. link_args: linkflag)