From 9f4886e031996bb5f1524155f6a0313324907836 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 15 Jul 2024 10:59:35 +0500 Subject: [PATCH] Only define FLUIDSYNTH_NOT_A_DLL when linking statically --- src/sound/CMakeLists.txt | 8 ++++++-- src/sound/midi_fluidsynth.c | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sound/CMakeLists.txt b/src/sound/CMakeLists.txt index a05481228..2d57a42e0 100644 --- a/src/sound/CMakeLists.txt +++ b/src/sound/CMakeLists.txt @@ -90,8 +90,12 @@ if(FLUIDSYNTH) target_link_libraries(86Box PkgConfig::FLUIDSYNTH) if(STATIC_BUILD) target_link_libraries(86Box -static ${FLUIDSYNTH_STATIC_LIBRARIES} -fopenmp) - if(WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") - target_link_libraries(86Box psapi) + if(WIN32) + add_compile_definitions(FLUIDSYNTH_NOT_A_DLL) + + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64") + target_link_libraries(86Box psapi) + endif() endif() endif() diff --git a/src/sound/midi_fluidsynth.c b/src/sound/midi_fluidsynth.c index c1b9956d0..f8c7964f7 100644 --- a/src/sound/midi_fluidsynth.c +++ b/src/sound/midi_fluidsynth.c @@ -7,7 +7,6 @@ #ifdef __unix__ # include #endif -#define FLUIDSYNTH_NOT_A_DLL #include #include <86box/86box.h>