Assists music production by grouping standalone programs into sessions. Community version of "Non Session Manager".
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.

105 lines
3.3KB

  1. ##############################################################################
  2. # Copyright (C) 2020- Nils Hilbricht
  3. #
  4. # This file is part of New-Session-Manager
  5. #
  6. # New-Session-Manager is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # New-Session-Manager is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with New-Session-Manager. If not, see <https://www.gnu.org/licenses/>.
  18. ##############################################################################
  19. project('new-session-manager', 'c', 'cpp', version : '1.3.1', license : 'GPLv3')
  20. ##############
  21. #Dependencies
  22. ##############
  23. liblodep = dependency('liblo') #and not 'lo'
  24. threaddep = dependency('threads')
  25. jackdep = dependency('jack', required: get_option('jackpatch')) #and not 'libjack'
  26. cc = meson.get_compiler('c')
  27. fltkdep = cc.find_library('fltk', required: get_option('nsm-legacy-gui') or get_option('nsm-proxy'))
  28. fltkimagesdep = cc.find_library('fltk_images', required: get_option('nsm-legacy-gui'))
  29. fluid = find_program('fluid', required: get_option('nsm-proxy'))
  30. ##############
  31. #Build Targets
  32. ##############
  33. executable('nsmd',
  34. sources: ['src/nsmd.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/file.cpp', 'src/Thread.cpp'],
  35. dependencies: [liblodep, threaddep],
  36. install: true,
  37. )
  38. #For options see meson_options.txt
  39. #All get_options are default=true
  40. if get_option('jackpatch')
  41. executable('jackpatch',
  42. 'src/jackpatch.c',
  43. dependencies: [liblodep, jackdep],
  44. install: true,
  45. )
  46. endif
  47. if get_option('nsm-proxy')
  48. NSM_Proxy_UI_cpp = custom_target(
  49. 'NSM_Proxy_UI.cpp',
  50. output : 'NSM_Proxy_UI.C',
  51. input : 'src/NSM_Proxy_UI.fl',
  52. command : [fluid, '-c', '-o', '@OUTPUT@', '@INPUT@'],
  53. )
  54. NSM_Proxy_UI_h = custom_target(
  55. 'NSM_Proxy_UI.h',
  56. output : 'NSM_Proxy_UI.H',
  57. input : 'src/NSM_Proxy_UI.fl',
  58. command : [fluid, '-c', '-h', '@OUTPUT@', '@INPUT@'],
  59. )
  60. executable('nsm-proxy',
  61. sources: ['src/nsm-proxy.cpp', 'src/debug.cpp'],
  62. dependencies: [liblodep, threaddep],
  63. install: true,
  64. )
  65. executable('nsm-proxy-gui',
  66. sources: ['src/nsm-proxy-gui.cpp', [NSM_Proxy_UI_cpp, NSM_Proxy_UI_h]],
  67. dependencies: [fltkdep, liblodep, threaddep],
  68. install: true,
  69. )
  70. endif
  71. if get_option('nsm-legacy-gui')
  72. executable('nsm-legacy-gui',
  73. sources: ['src/legacy-gui.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/Thread.cpp', 'src/FL/Fl_Scalepack.C'],
  74. dependencies: [fltkimagesdep, fltkdep, liblodep, threaddep],
  75. install: true,
  76. )
  77. install_data('src/org.linuxaudio.nsm-legacy-gui.desktop', install_dir : get_option('datadir') / 'applications')
  78. meson.add_install_script('sh', '-c',
  79. 'ln -sf nsm-legacy-gui ${DESTDIR}@0@/@1@/non-session-manager'.format(
  80. get_option('prefix'), get_option('bindir')))
  81. endif