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.

131 lines
4.7KB

  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. #Please keep the version number in a separate line so we can automatically update it.
  20. #Also keep it at the beginning of the line and leave spaces around the colon.
  21. #It's source is in src/nsmd.cpp #DEFINE VERSION_STRING
  22. project(
  23. 'new-session-manager',
  24. 'c', 'cpp',
  25. version : '1.6.1',
  26. license : 'GPLv3',
  27. )
  28. ##############
  29. #Dependencies
  30. ##############
  31. liblodep = dependency('liblo') #and not 'lo'
  32. threaddep = dependency('threads')
  33. jackdep = dependency('jack', required: get_option('jackpatch')) #and not 'libjack'
  34. cc = meson.get_compiler('c')
  35. fltkdep = cc.find_library('fltk', required: get_option('nsm-legacy-gui') or get_option('nsm-proxy'))
  36. fltkimagesdep = cc.find_library('fltk_images', required: get_option('nsm-legacy-gui'))
  37. fluid = find_program('fluid', required: get_option('nsm-proxy'))
  38. ##############
  39. #Build Targets
  40. ##############
  41. executable('nsmd',
  42. sources: ['src/nsmd.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/file.cpp', 'src/Thread.cpp'],
  43. dependencies: [liblodep, threaddep],
  44. install: true,
  45. )
  46. install_man(['docs/src/nsmd.1'])
  47. install_data('docs/index.html', install_dir : get_option('datadir') / 'doc/new-session-manager')
  48. install_data('docs/api/index.html', install_dir : get_option('datadir') / 'doc/new-session-manager/api')
  49. install_data('CHANGELOG', install_dir : get_option('datadir') / 'doc/new-session-manager')
  50. install_data('README.md', install_dir : get_option('datadir') / 'doc/new-session-manager')
  51. #For options see meson_options.txt
  52. #All get_options are default=true
  53. if get_option('jackpatch')
  54. executable('jackpatch',
  55. 'src/jackpatch.c',
  56. dependencies: [liblodep, jackdep],
  57. install: true,
  58. )
  59. install_data('src/jackpatch.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
  60. install_data('src/org.jackaudio.jackpatch.desktop', install_dir : get_option('datadir') / 'applications')
  61. install_man(['docs/src/jackpatch.1', ])
  62. endif
  63. if get_option('nsm-proxy')
  64. NSM_Proxy_UI_cpp = custom_target(
  65. 'NSM_Proxy_UI.cpp',
  66. output : 'NSM_Proxy_UI.C',
  67. input : 'src/NSM_Proxy_UI.fl',
  68. command : [fluid, '-c', '-o', '@OUTPUT@', '@INPUT@'],
  69. )
  70. NSM_Proxy_UI_h = custom_target(
  71. 'NSM_Proxy_UI.h',
  72. output : 'NSM_Proxy_UI.H',
  73. input : 'src/NSM_Proxy_UI.fl',
  74. command : [fluid, '-c', '-h', '@OUTPUT@', '@INPUT@'],
  75. )
  76. executable('nsm-proxy',
  77. sources: ['src/nsm-proxy.cpp', 'src/debug.cpp'],
  78. dependencies: [liblodep, threaddep],
  79. install: true,
  80. )
  81. executable('nsm-proxy-gui',
  82. sources: ['src/nsm-proxy-gui.cpp', [NSM_Proxy_UI_cpp, NSM_Proxy_UI_h]],
  83. dependencies: [fltkdep, liblodep, threaddep],
  84. install: true,
  85. )
  86. install_data('src/nsm-proxy.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
  87. install_data('src/org.jackaudio.nsm-proxy.desktop', install_dir : get_option('datadir') / 'applications')
  88. install_man(['docs/src/nsm-proxy.1', 'docs/src/nsm-proxy-gui.1'])
  89. endif
  90. if get_option('nsm-legacy-gui')
  91. executable('nsm-legacy-gui',
  92. sources: ['src/nsm-legacy-gui.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/Thread.cpp', 'src/FL/Fl_Scalepack.C'],
  93. dependencies: [fltkimagesdep, fltkdep, liblodep, threaddep],
  94. install: true,
  95. )
  96. install_data('src/org.jackaudio.nsm-legacy-gui.desktop', install_dir : get_option('datadir') / 'applications')
  97. install_data('src/nsm-legacy-gui.svg', install_dir : get_option('datadir') / 'icons/hicolor/scalable/apps')
  98. install_man(['docs/src/nsm-legacy-gui.1', 'docs/src/non-session-manager.1'])
  99. #Symlinking is a one-way operation and can't be uninstalled, we rely on distribution packages for that
  100. meson.add_install_script('sh', '-c',
  101. 'ln -sf nsm-legacy-gui ${DESTDIR}@0@/@1@/non-session-manager'.format(
  102. get_option('prefix'), get_option('bindir')))
  103. endif