Skip to content

Commit

Permalink
MinGW build portability fixes
Browse files Browse the repository at this point in the history
AKA you can build melonDS for Windows on Fedora now
  • Loading branch information
nadiaholmquist committed May 15, 2024
1 parent a2406e3 commit d21bc64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/debug/GdbProto.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifdef _WIN32
#include <WS2tcpip.h>
#include <ws2tcpip.h>
#include <winsock.h>
#include <winsock2.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/debug/GdbStub.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#ifdef _WIN32
#include <WS2tcpip.h>
#include <ws2tcpip.h>
#include <winsock.h>
#include <winsock2.h>
#endif
Expand Down
7 changes: 6 additions & 1 deletion src/frontend/libslirp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ set(SOURCES

configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/libslirp-version.h.in" "${CMAKE_CURRENT_BINARY_DIR}/libslirp-version.h")

add_library(slirp STATIC ${SOURCES})
if (BUILD_STATIC)
add_library(slirp STATIC ${SOURCES})
else()
add_library(slirp ${SOURCES})
endif()

target_include_directories(slirp PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/glib")
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/qt_sdl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ if (WIN32)

../glad/glad_wgl.c
)

if (MINGW AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set_property(TARGET melonDS PROPERTY AUTORCC_OPTIONS "--no-zstd")
endif()
elseif (APPLE)
if (NOT USE_QT6)
find_library(COCOA_LIB Cocoa)
Expand Down

0 comments on commit d21bc64

Please sign in to comment.