Implement manual fallback for nitrogfx

This makes it possible to pass default_options to the subproject
This commit is contained in:
mid-kid 2023-08-02 19:25:03 +02:00
parent aae349f4f5
commit fa8ffe4d6b
3 changed files with 6 additions and 5 deletions

View File

@ -69,4 +69,4 @@ elif is_wsl_accessing_windows; then
fi
# Launch meson
"${MESON:-meson}" setup -Dnitrogfx:native=true --native-file=meson/"$native_file" --native-file="$build/root.ini" --cross-file=meson/"$cross_file" --cross-file="$build/root.ini" "$@" -- "$build"
"${MESON:-meson}" setup --native-file=meson/"$native_file" --native-file="$build/root.ini" --cross-file=meson/"$cross_file" --cross-file="$build/root.ini" "$@" -- "$build"

View File

@ -2,6 +2,3 @@
url = https://github.com/red031000/nitrogfx.git
revision = head
depth = 1
[provide]
program_names = nitrogfx

View File

@ -11,4 +11,8 @@ makelcf_exe = find_program('makelcf', native: true)
makerom_exe = find_program('makerom', native: true)
# External tools
nitrogfx_exe = find_program('nitrogfx', native: true)
nitrogfx_exe = find_program('nitrogfx', native: true, required: false)
if not nitrogfx_exe.found()
subproject('nitrogfx', default_options: 'native=true')
nitrogfx_exe = find_program('nitrogfx', native: true)
endif