midi: Switch to dynamic fluidsynth

This commit is contained in:
RichardG867
2023-07-08 13:49:02 -03:00
parent 32116fdd8f
commit 4ecfdb4834
2 changed files with 31 additions and 125 deletions

View File

@@ -85,12 +85,11 @@ if(RTMIDI)
endif()
if(FLUIDSYNTH)
if(APPLE)
find_library(FLUIDSYNTH_LIB fluidsynth)
if (NOT FLUIDSYNTH_LIB)
message(WARNING "Could not find fluid synth. The library will not be bundled and any related features will not work.")
endif()
endif ()
find_package(PkgConfig REQUIRED)
pkg_check_modules(FLUIDSYNTH REQUIRED IMPORTED_TARGET fluidsynth)
target_link_libraries(86Box PkgConfig::FLUIDSYNTH)
target_link_libraries(86Box -static ${FLUIDSYNTH_STATIC_LIBRARIES} -fopenmp)
target_compile_definitions(snd PRIVATE USE_FLUIDSYNTH)
target_sources(snd PRIVATE midi_fluidsynth.c)
endif()