Only define FLUIDSYNTH_NOT_A_DLL when linking statically

This commit is contained in:
Alexander Babikov
2024-07-15 10:59:35 +05:00
parent 0177e2881a
commit 9f4886e031
2 changed files with 6 additions and 3 deletions

View File

@@ -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()

View File

@@ -7,7 +7,6 @@
#ifdef __unix__
# include <unistd.h>
#endif
#define FLUIDSYNTH_NOT_A_DLL
#include <fluidsynth.h>
#include <86box/86box.h>