forked from 0xtob/nitrotracker
-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathmeson.build
More file actions
157 lines (148 loc) · 5.87 KB
/
Copy pathmeson.build
File metadata and controls
157 lines (148 loc) · 5.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
project(
'nitroustracker', ['c', 'cpp'],
version: '0.7.0',
default_options: ['buildtype=debugoptimized', 'debug=true', 'optimization=2', 'c_std=gnu2x', 'cpp_std=gnu++20', 'warning_level=3']
)
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
windows_build = target_machine.system() == 'windows'
conf_data = configuration_data()
conf_data.set('version', meson.project_version())
libntxm_sources = [
'libntxm/libntxm/source/common/demokit.c',
'libntxm/libntxm/source/common/instrument.cpp',
'libntxm/libntxm/source/common/ntxmtools.c',
'libntxm/libntxm/source/common/sample.cpp',
'libntxm/libntxm/source/common/song.cpp',
'libntxm/libntxm/source/common/tables.c',
'libntxm/libntxm/source/player/player.cpp',
'libntxm/libntxm/source/single/fifocommand.cpp',
'libntxm/libntxm/source/single/ntxmsound.cpp',
'libntxm/libntxm/source/single/platform_sdl3.cpp',
'libntxm/libntxm/source/transport/format_transport.cpp',
'libntxm/libntxm/source/transport/mod_transport.cpp',
'libntxm/libntxm/source/transport/wav.cpp',
'libntxm/libntxm/source/transport/xm_transport.cpp'
]
nitroustracker_sources = [
'tobkit/source/bitbutton.cpp',
'tobkit/source/button.cpp',
'tobkit/source/checkbox.cpp',
'tobkit/source/digitbox.cpp',
'tobkit/source/fileselector.cpp',
'tobkit/source/gradienticon.cpp',
'tobkit/source/groupbox.cpp',
'tobkit/source/gui.cpp',
'tobkit/source/label.cpp',
'tobkit/source/listbox.cpp',
'tobkit/source/memoryindicator.cpp',
'tobkit/source/messagebox.cpp',
'tobkit/source/numberbox.cpp',
'tobkit/source/numberslider.cpp',
'tobkit/source/piano.cpp',
'tobkit/source/piano_hit.c',
'tobkit/source/piano_pal.c',
'tobkit/source/pixmap.cpp',
'tobkit/source/radiobutton.cpp',
'tobkit/source/radiobuttongroup.cpp',
'tobkit/source/screen.cpp',
'tobkit/source/tabbox.cpp',
'tobkit/source/theme.cpp',
'tobkit/source/themeselectorbox.cpp',
'tobkit/source/togglebutton.cpp',
'tobkit/source/typewriter.cpp',
'tobkit/source/typewriter_hit.c',
'tobkit/source/widget.cpp',
'common/source/action.cpp',
'common/source/cell_array.cpp',
'common/source/debug_helpers.cpp',
'common/source/dsmidi_handler.cpp',
'common/source/main.cpp',
'common/source/settings.cpp',
'common/source/state.cpp',
'common/source/tools.cpp',
'common/source/libnds/trig.c',
'common/source/tobkit/envelope_editor.cpp',
'common/source/tobkit/fxkeyboard.cpp',
'common/source/tobkit/normalizebox.cpp',
'common/source/tobkit/numbersliderrelnote.cpp',
'common/source/tobkit/patternview.cpp',
'common/source/tobkit/recordbox.cpp',
'common/source/tobkit/sampledisplay.cpp',
'sdl/source/display_manager.cpp',
'sdl/source/platform.cpp'
]
bin2c_prog = find_program('tools/bin2c.py')
font_3x5_pack_prog = find_program('tools/font_3x5_pack.py')
font_pack_prog = find_program('tools/font_pack.py')
icon_pack_prog = find_program('tools/icon_pack.py')
icon_pngs = [
'tobkit/bitmaps/haken.png',
'common/bitmaps/icon_copy.png',
'common/bitmaps/icon_cut.png',
'common/bitmaps/icon_disk.png',
'common/bitmaps/icon_disk_unsaved.png',
'common/bitmaps/icon_flp.png',
'common/bitmaps/icon_fx.png',
'common/bitmaps/icon_new_folder.png',
'common/bitmaps/icon_paste.png',
'common/bitmaps/icon_pause.png',
'common/bitmaps/icon_play.png',
'common/bitmaps/icon_record.png',
'common/bitmaps/icon_redo.png',
'common/bitmaps/icon_sample.png',
'common/bitmaps/icon_song.png',
'common/bitmaps/icon_stop.png',
'common/bitmaps/icon_trumpet.png',
'common/bitmaps/icon_undo.png',
'common/bitmaps/icon_wrench.png',
'common/bitmaps/nitrotracker_logo.png',
'common/bitmaps/sampleedit_all.png',
'common/bitmaps/sampleedit_chip_icon.png',
'common/bitmaps/sampleedit_control_icon.png',
'common/bitmaps/sampleedit_del.png',
'common/bitmaps/sampleedit_draw.png',
'common/bitmaps/sampleedit_draw_small.png',
'common/bitmaps/sampleedit_fadein.png',
'common/bitmaps/sampleedit_fadeout.png',
'common/bitmaps/sampleedit_loop_icon.png',
'common/bitmaps/sampleedit_none.png',
'common/bitmaps/sampleedit_normalize.png',
'common/bitmaps/sampleedit_record.png',
'common/bitmaps/sampleedit_reverse.png',
'common/bitmaps/sampleedit_trim.png',
'common/bitmaps/sampleedit_wave_icon.png'
]
sdl3_dep = dependency('sdl3', required: true)
add_project_arguments(
cc.get_supported_arguments([
'-Wno-unused-parameter'
]),
language: 'c')
add_project_arguments(
cxx.get_supported_arguments([
'-Wno-unused-parameter'
]),
language: 'cpp')
add_project_arguments('-DNT_PLATFORM_SDL3', language: 'c')
add_project_arguments('-DNT_PLATFORM_SDL3', language: 'cpp')
add_project_arguments('-DVERSION="WIP"', language: 'cpp')
add_project_arguments('-DGIT_HASH="WIP"', language: 'cpp')
add_project_arguments('-DDEBUG', language: 'cpp')
libntxm = static_library('ntxm', libntxm_sources,
dependencies: [sdl3_dep],
include_directories: include_directories('libntxm/libntxm/include'))
font_3x5_pack = generator(font_3x5_pack_prog, output: '@BASENAME@.raw', arguments: ['@INPUT@', '@OUTPUT@'])
font_pack = generator(font_pack_prog, output: '@BASENAME@.raw', arguments: ['@INPUT@', '@OUTPUT@'])
icon_pack = generator(icon_pack_prog, output: '@BASENAME@.raw', arguments: ['@INPUT@', '@OUTPUT@'])
bin2c_raw = generator(bin2c_prog, output: '@BASENAME@_raw.c', arguments: ['--field_name', '@BASENAME@_raw', '@OUTPUT@', '@INPUT@'])
icon_raws = icon_pack.process(icon_pngs)
font_raws = font_pack.process('tobkit/fonts/font_8x11.png')
font_3x5_raws = font_3x5_pack.process('tobkit/fonts/font_3x5.png')
nitroustracker_sources += bin2c_raw.process(icon_raws)
nitroustracker_sources += bin2c_raw.process(font_raws)
nitroustracker_sources += bin2c_raw.process(font_3x5_raws)
nitroustracker = executable('nitroustracker', nitroustracker_sources,
dependencies: [sdl3_dep],
include_directories: include_directories('libntxm/libntxm/include', 'tobkit/include', 'common/source', 'sdl/source'),
link_with: [libntxm])