1
1
project (
2
2
' python-rtmidi' ,
3
3
' cpp' ,
4
- version : ' 1.5.0 ' ,
4
+ version : ' 1.5.1 ' ,
5
5
license : ' MIT' ,
6
6
default_options : [
7
7
' warning_level=2'
@@ -11,40 +11,9 @@ project(
11
11
12
12
cpp = meson .get_compiler(' cpp' )
13
13
14
- ## From https://github.com/numpy/numpy/blob/main/numpy/meson.build
15
- # Platform detection
16
- if host_machine .system() == ' windows' and cpp.get_id() == ' gcc'
17
- # For mingw-w64, link statically against the UCRT.
18
- gcc_link_args = [' -lucrt' , ' -static' ]
19
-
20
- add_project_link_arguments (gcc_link_args, language : [' c' , ' cpp' ])
21
- # Force gcc to float64 long doubles for compatibility with MSVC
22
- # builds, for C only.
23
- add_project_arguments (' -mlong-double-64' , language : ' c' )
24
- # Make fprintf("%zd") work (see https://github.com/rgommers/scipy/issues/118)
25
- add_project_arguments (' -D__USE_MINGW_ANSI_STDIO=1' , language : [' c' , ' cpp' ])
26
- # Manual add of MS_WIN64 macro when not using MSVC.
27
- # https://bugs.python.org/issue28267
28
- add_project_arguments (' -DMS_WIN64' , language : [' c' , ' cpp' ])
29
- endif
30
- ##
31
-
32
- if host_machine .system() == ' darwin'
33
- # Enable c++11 support
34
- add_project_arguments (' -std=c++11' , language : [' cpp' ])
35
- endif
36
-
37
- # Dependencies
14
+ # Jack API (portable)
38
15
jack2_dep = dependency (' jack' , version : ' >=1.9.11' , required : false )
39
16
jack1_dep = dependency (' jack' , version : [' >=0.125.0' , ' <1.0' ], required : false )
40
- alsa_dep = dependency (' alsa' , required : false )
41
- threads_dep = dependency (' threads' )
42
- coremidi_dep = dependency (
43
- ' appleframeworks' ,
44
- modules : [' coreaudio' , ' coremidi' , ' foundation' ],
45
- required : false
46
- )
47
- winmm_dep = cpp.find_library (' winmm' , required : false )
48
17
49
18
if not jack2_dep.found() and jack1_dep.found()
50
19
jack_dep = jack1_dep
55
24
jack_dep = disabler ()
56
25
endif
57
26
27
+
28
+ jack_not_found = jack_dep.found() ? false : true
29
+
30
+ ## From https://github.com/numpy/numpy/blob/main/numpy/meson.build
31
+ # Platform dependent config
32
+ if host_machine .system() == ' windows'
33
+ # WINDOWS
34
+ if cpp.get_id() == ' gcc'
35
+ # For mingw-w64, link statically against the UCRT.
36
+ gcc_link_args = [' -lucrtbase' , ' -static' ]
37
+ add_project_link_arguments (gcc_link_args, language : [' c' , ' cpp' ])
38
+ # Make fprintf("%zd") work (see https://github.com/rgommers/scipy/issues/118)
39
+ add_project_arguments (' -D__USE_MINGW_ANSI_STDIO=1' , language : [' c' , ' cpp' ])
40
+ # Manual add of MS_WIN64 macro when not using MSVC.
41
+ # https://bugs.python.org/issue28267
42
+ add_project_arguments (' -DMS_WIN64' , language : [' c' , ' cpp' ])
43
+ elif cpp.get_id() == ' msvc'
44
+ # Force gcc to float64 long doubles for compatibility with MSVC
45
+ # builds, for C only.
46
+ add_project_arguments (' -mlong-double-64' , language : ' c' )
47
+ endif
48
+
49
+ # API
50
+ winmm_dep = cpp.find_library (' winmm' , required : jack_not_found)
51
+ elif host_machine .system() == ' darwin'
52
+ # OSX
53
+
54
+ # Enable c++11 support
55
+ add_project_arguments (' -std=c++11' , language : [' cpp' ])
56
+
57
+ # API
58
+ coremidi_dep = dependency (
59
+ ' appleframeworks' ,
60
+ modules : [' coreaudio' , ' coremidi' , ' foundation' ],
61
+ required : jack_not_found
62
+ )
63
+ else
64
+ # LINUX
65
+
66
+ # API
67
+ alsa_dep = dependency (' alsa' , required : jack_not_found)
68
+ threads_dep = dependency (' threads' )
69
+ endif # Platform detection
70
+
58
71
pymod = import (' python' )
59
72
python = pymod.find_installation(get_option (' python' ), required : true )
60
73
72
85
summary ({
73
86
' Debug messages (verbose)' : get_option (' verbose' ),
74
87
' Build for wheel' : get_option (' wheel' ),
88
+ ' JACK support' : jack_dep.found() and get_option (' jack' ),
75
89
' ALSA support' : host_machine .system() == ' linux' and alsa_dep.found() and get_option (' alsa' ),
76
90
' CoreMIDI support' : host_machine .system() == ' darwin' and coremidi_dep.found() and get_option (' coremidi' ),
77
- ' JACK support' : jack_dep.found() and get_option (' jack' ),
78
91
' Window MM support' : host_machine .system() == ' windows' and winmm_dep.found() and get_option (' winmm' ),
79
92
}, section : ' Configuration' )
93
+
0 commit comments