Skip to content

Conversation

@MengLinMaker
Copy link

Successfully building libsndfile for issue #9

The CMakeLists.txt is currently written to succeed despite not finding packages.
Ideally it should fail when a package is not found.
Why build for something if it lacks the feature we want?

VCPKG provides ".pc" files required by pkg_check_modules()

I've added CMakePresets.json to simplify build scripts in makefile.

Comment on lines -24 to -108
if ( PULSE_SUPPORT )
set ( fluid_pulse_SOURCES drivers/fluid_pulse.c )
endif ( PULSE_SUPPORT )

if ( ALSA_SUPPORT )
set ( fluid_alsa_SOURCES drivers/fluid_alsa.c )
endif ( ALSA_SUPPORT )

if ( COREAUDIO_SUPPORT )
set ( fluid_coreaudio_SOURCES drivers/fluid_coreaudio.c )
endif ( COREAUDIO_SUPPORT )

if ( COREMIDI_SUPPORT )
set ( fluid_coremidi_SOURCES drivers/fluid_coremidi.c )
endif ( COREMIDI_SUPPORT )

if ( DBUS_SUPPORT )
set ( fluid_dbus_SOURCES bindings/fluid_rtkit.c bindings/fluid_rtkit.h )
endif ( DBUS_SUPPORT )

if ( JACK_SUPPORT )
set ( fluid_jack_SOURCES drivers/fluid_jack.c )
endif ( JACK_SUPPORT )

if ( PIPEWIRE_SUPPORT )
set ( fluid_pipewire_SOURCES drivers/fluid_pipewire.c )
include_directories ( SYSTEM ${PIPEWIRE_INCLUDE_DIRS} )
endif ( PIPEWIRE_SUPPORT )

if ( PORTAUDIO_SUPPORT )
set ( fluid_portaudio_SOURCES drivers/fluid_portaudio.c )
endif ( PORTAUDIO_SUPPORT )

if ( DSOUND_SUPPORT )
set ( fluid_dsound_SOURCES drivers/fluid_dsound.c )
endif ( DSOUND_SUPPORT )

if ( WASAPI_SUPPORT )
set ( fluid_wasapi_SOURCES drivers/fluid_wasapi.c )
endif ( WASAPI_SUPPORT )

if ( WAVEOUT_SUPPORT )
set ( fluid_waveout_SOURCES drivers/fluid_waveout.c )
endif ( WAVEOUT_SUPPORT )

if ( WINMIDI_SUPPORT )
set ( fluid_winmidi_SOURCES drivers/fluid_winmidi.c )
endif ( WINMIDI_SUPPORT )

if ( SDL2_SUPPORT )
set ( fluid_sdl2_SOURCES drivers/fluid_sdl2.c )
endif ( SDL2_SUPPORT )

if ( OSS_SUPPORT )
set ( fluid_oss_SOURCES drivers/fluid_oss.c )
endif ( OSS_SUPPORT )

if ( LASH_SUPPORT )
set ( fluid_lash_SOURCES bindings/fluid_lash.c bindings/fluid_lash.h )
endif ( LASH_SUPPORT )

if ( DART_SUPPORT )
set ( fluid_dart_SOURCES drivers/fluid_dart.c )
endif ( DART_SUPPORT )

if ( MIDISHARE_SUPPORT )
set ( fluid_midishare_SOURCES drivers/fluid_midishare.c )
endif ( MIDISHARE_SUPPORT )

if ( AUFILE_SUPPORT )
set ( fluid_aufile_SOURCES drivers/fluid_aufile.c )
endif ( AUFILE_SUPPORT )

if ( LIBINSTPATCH_SUPPORT )
set ( fluid_libinstpatch_SOURCES sfloader/fluid_instpatch.c sfloader/fluid_instpatch.h )
endif ( LIBINSTPATCH_SUPPORT )

if ( OPENSLES_SUPPORT )
set ( fluid_opensles_SOURCES drivers/fluid_opensles.c )
endif ( OPENSLES_SUPPORT )

if ( OBOE_SUPPORT )
set ( fluid_oboe_SOURCES drivers/fluid_oboe.cpp )
endif ( OBOE_SUPPORT )

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the patch for Emscripten build should be as small as possible (to follow the newer version of FluidSynth).
It seems that this diff is not necessary; if it is correct, please keep those lines and files.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough.
I removed these initially because I couldn't see the benefit of having drivers in WASM.
Yeah, it's not totally necessary to remove.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, merging wrong branch...

@MengLinMaker MengLinMaker changed the title Standardise dependency management with vcpkg (Whoops wrong branch) - Standardise dependency management with vcpkg Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants