Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MinGW builds #61

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ endif()
# Initialize our list of find_package dependencies for configure_package_config_file
set(ZMUSIC_PACKAGE_DEPENDENCIES "" CACHE INTERNAL "")

if (WIN32 AND MINGW)
add_compile_definitions(-D_UNICODE -DUNICODE)
add_compile_definitions(-D__USE_MINGW_ANSI_STDIO=1)
endif()

add_subdirectory(thirdparty)
add_subdirectory(source)

Expand Down
1 change: 1 addition & 0 deletions source/mididevices/music_win_mididevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <mmsystem.h>
#include <algorithm>
#include <mutex>
#include <stdexcept>
#include <assert.h>

// HEADER FILES ------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion thirdparty/fluidsynth/src/utils/win32_glibstubs.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifdef WIN32
#include <Windows.h>
#include <assert.h>
#include <stdio.h>

/* Miscellaneous stubs */
#define GLIB_CHECK_VERSION(x, y, z) 0 /* Evaluate to 0 to get FluidSynth to use the "old" thread API */
Expand All @@ -26,6 +27,9 @@ typedef void *gpointer;
#define G_UNLIKELY(expr) (expr)
#endif

#define g_vsnprintf(b, c, f, a) vsnprintf(b, c, f, a)
#define g_snprintf(b, c, f, ...) snprintf(b, c, f, __VA_ARGS__)

#define g_return_val_if_fail(expr, val) if (expr) {} else { return val; }
#define g_clear_error(err) do {} while (0)

Expand Down Expand Up @@ -134,4 +138,4 @@ typedef DWORD GStaticPrivate;

#endif

#endif
#endif
Loading