Browse Source

Meson build targets now options. Reflect in readme

tags/v1.3.1
Nils 4 years ago
parent
commit
326a46ce9f
No known key found for this signature in database GPG Key ID: 28C6A306F2909FEE
4 changed files with 72 additions and 24 deletions
  1. +1
    -0
      CHANGELOG
  2. +21
    -3
      README.md
  3. +44
    -21
      meson.build
  4. +6
    -0
      meson_options.txt

+ 1
- 0
CHANGELOG View File

@@ -1,5 +1,6 @@
v1.3.1 v1.3.1
Add header copyright even to unchanged files to adhere to stricter packaging requirements. Add header copyright even to unchanged files to adhere to stricter packaging requirements.
Meson can now switch off individual executables and will stop/error when trying to build without dependencies.


v1.3 v1.3
Rebranding to "new session manager" Rebranding to "new session manager"


+ 21
- 3
README.md View File

@@ -61,16 +61,34 @@ See file COPYING
## Build ## Build
The build system is meson. The build system is meson.


This repository builds `nsmd` and `jackpatch`. Dependencies are `JACK Audio Connection Kit` and
`liblo`, the OSC library. If your system has `FLTK` installed (detected by the first step below)
meson will enable building of `nsm-proxy` and legacy GUI `new-session-manager` as well.
This is a software package that will compile and install multiple executables:
* `nsmd`, the daemon or server itself. It is mandatory.
* It has no GUI.
* Dependencies are `JACK Audio Connection Kit` and liblo`, the OSC library.
* `jackpatch`, NSM client to save and remember JACK connections.
* It has no GUI.
* Dependencies are `JACK Audio Connection Kit` and `liblo`, the OSC library.
* Can be deactivated (see below) `-Djackpatch=false`
* `new-session-manager`, Legacy GUI for the user
* Dependencies are `FLTK` and `liblo`, the OSC library.
* Can be deactivated (see below) `-Dnew-session-manager=false`
* `nsm-proxy`, NSM GUI Client to run any program without direct NSM support
* Dependencies are `FLTK`, `fluid` (FLTK Editor/compiler, maybe in the same package as FLTK, maybe not) and `liblo`, the OSC library.
* Can be deactivated (see below) `-Dnsm-proxy=false`



``` ```
meson build --prefix=/usr meson build --prefix=/usr
#or disable individual build targets:
#meson build --prefix=/usr -Dnew-session-manager=false -Dnsm-proxy=false -Djackpatch=false
cd build && ninja cd build && ninja
sudo ninja install sudo ninja install
``` ```


Optionally you can skip `sudo ninja install` and run all executables from the build-dir.
In this case you need to add the build-dir to your PATH environment variable so that the tools
can find each other.

## Names of Executable Files and Symlinks ## Names of Executable Files and Symlinks


Some distributions (and possibly local laws) prevent a forked software project from creating Some distributions (and possibly local laws) prevent a forked software project from creating


+ 44
- 21
meson.build View File

@@ -17,27 +17,24 @@
# along with New-Session-Manager. If not, see <https://www.gnu.org/licenses/>. # along with New-Session-Manager. If not, see <https://www.gnu.org/licenses/>.
############################################################################## ##############################################################################


project('new-session-manager', 'c', 'cpp', version : '1.3.0', license : 'GPLv3')
project('new-session-manager', 'c', 'cpp', version : '1.3.1', license : 'GPLv3')

##############
#Dependencies
##############


liblodep = dependency('liblo') #and not 'lo' liblodep = dependency('liblo') #and not 'lo'
threaddep = dependency('threads') threaddep = dependency('threads')
jackdep = dependency('jack') #and not 'libjack'
jackdep = dependency('jack', required: get_option('jackpatch')) #and not 'libjack'


cc = meson.get_compiler('c') cc = meson.get_compiler('c')
fluid = find_program('fluid', required: false)
fltkdep = cc.find_library('fltk', required: false)
fltkdep = cc.find_library('fltk', required: get_option('new-session-manager') or get_option('nsm-proxy'))
fluid = find_program('fluid', required: get_option('nsm-proxy'))


executable('jackpatch',
'src/jackpatch.c',
dependencies: [liblodep, jackdep],
install: true,
)


executable('nsm-proxy',
sources: ['src/nsm-proxy.cpp', 'src/debug.cpp'],
dependencies: [liblodep, threaddep],
install: true,
)
##############
#Build Targets
##############


executable('nsmd', executable('nsmd',
sources: ['src/nsmd.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/file.cpp', 'src/Thread.cpp'], sources: ['src/nsmd.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/file.cpp', 'src/Thread.cpp'],
@@ -45,7 +42,22 @@ executable('nsmd',
install: true, install: true,
) )


if fluid.found() and fltkdep.found()

#For options see meson_options.txt
#All get_options are default=true

if get_option('jackpatch')

executable('jackpatch',
'src/jackpatch.c',
dependencies: [liblodep, jackdep],
install: true,
)
endif


if get_option('nsm-proxy')

NSM_Proxy_UI_cpp = custom_target( NSM_Proxy_UI_cpp = custom_target(
'NSM_Proxy_UI.cpp', 'NSM_Proxy_UI.cpp',
output : 'NSM_Proxy_UI.C', output : 'NSM_Proxy_UI.C',
@@ -60,10 +72,26 @@ if fluid.found() and fltkdep.found()
command : [fluid, '-c', '-h', '@OUTPUT@', '@INPUT@'], command : [fluid, '-c', '-h', '@OUTPUT@', '@INPUT@'],
) )



executable('nsm-proxy',
sources: ['src/nsm-proxy.cpp', 'src/debug.cpp'],
dependencies: [liblodep, threaddep],
install: true,
)

executable('nsm-proxy-gui',
sources: ['src/nsm-proxy-gui.cpp', [NSM_Proxy_UI_cpp, NSM_Proxy_UI_h]],
dependencies: [fltkdep, liblodep, threaddep],
install: true,
)
endif

if get_option('new-session-manager')

executable('new-session-manager', executable('new-session-manager',
sources: ['src/session-manager.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/Thread.cpp', 'src/FL/Fl_Scalepack.C'], sources: ['src/session-manager.cpp', 'src/debug.cpp', 'src/Endpoint.cpp', 'src/Thread.cpp', 'src/FL/Fl_Scalepack.C'],
dependencies: [fltkdep, liblodep, threaddep], dependencies: [fltkdep, liblodep, threaddep],
install: true,
install: true,
) )


install_data('src/org.linuxaudio.new-session-manager.desktop', install_dir : get_option('datadir') / 'applications') install_data('src/org.linuxaudio.new-session-manager.desktop', install_dir : get_option('datadir') / 'applications')
@@ -72,9 +100,4 @@ if fluid.found() and fltkdep.found()
'ln -sf new-session-manager ${DESTDIR}@0@/@1@/non-session-manager'.format( 'ln -sf new-session-manager ${DESTDIR}@0@/@1@/non-session-manager'.format(
get_option('prefix'), get_option('bindir'))) get_option('prefix'), get_option('bindir')))


executable('nsm-proxy-gui',
sources: ['src/nsm-proxy-gui.cpp', [NSM_Proxy_UI_cpp, NSM_Proxy_UI_h]],
dependencies: [fltkdep, liblodep, threaddep],
install: true,
)
endif endif

+ 6
- 0
meson_options.txt View File

@@ -0,0 +1,6 @@
option('new-session-manager', type : 'boolean', value : true, description : 'Build new-session-manager GUI')
option('jackpatch', type : 'boolean', value : true, description : 'Build jackpatch client')
option('nsm-proxy', type : 'boolean', value : true, description : 'Build nsm-proxy client with GUI.')




Loading…
Cancel
Save